• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/test.gni")
15
16module_output_path = "hdf/osal"
17ohos_unittest("hdf_adapter_uhdf_test_osal") {
18  module_out_path = module_output_path
19
20  include_dirs = [
21    "//drivers/framework/include/platform",
22    "//drivers/framework/include/core",
23    "//drivers/framework/include/osal",
24    "//drivers/adapter/uhdf/posix/include",
25    "//drivers/framework/include/utils",
26    "//drivers/framework/include",
27    "//drivers/framework/test/unittest/include",
28    "//drivers/framework/test/unittest/osal",
29  ]
30
31  defines = [ "__USER__" ]
32  sources = [
33    "//drivers/framework/support/posix/test/unittest/common/hdf_osal_test.cpp",
34  ]
35  deps = [
36    "//drivers/adapter/build/test_common:libhdf_test_common",
37    "//drivers/adapter/uhdf2/utils:libhdf_utils",
38  ]
39  resource_config_file =
40      "//drivers/adapter/uhdf2/test/resource/osal/ohos_test.xml"
41  cflags = [
42    "-Wall",
43    "-Wextra",
44    "-Werror",
45    "-fsigned-char",
46    "-fno-common",
47    "-fno-strict-aliasing",
48  ]
49  if (is_standard_system) {
50    external_deps = [
51      "hiviewdfx_hilog_native:libhilog",
52      "utils_base:utils",
53    ]
54  } else {
55    external_deps = [ "hilog:libhilog" ]
56  }
57}
58
59ohos_unittest("hdf_adapter_uhdf_test_osal_posix") {
60  module_out_path = module_output_path
61
62  include_dirs = [
63    "//drivers/framework/include/platform",
64    "//drivers/framework/include/core",
65    "//drivers/framework/include/osal",
66    "//drivers/adapter/uhdf/posix/include",
67    "//drivers/framework/include/utils",
68    "//drivers/framework/include",
69    "//drivers/framework/test/unittest/include",
70    "//drivers/framework/test/unittest/osal",
71  ]
72
73  defines = [ "__USER__" ]
74  sources = [
75    "//drivers/framework/support/posix/test/unittest/common/hdf_osal_test_posix.cpp",
76    "//drivers/framework/test/unittest/osal/osal_all_test.c",
77    "//drivers/framework/test/unittest/osal/osal_get_case_test.c",
78    "//drivers/framework/test/unittest/osal/osal_list_test.c",
79  ]
80  deps = [ "//drivers/adapter/uhdf2/utils:libhdf_utils" ]
81
82  cflags = [
83    "-Wall",
84    "-Wextra",
85    "-Werror",
86    "-fsigned-char",
87    "-fno-common",
88    "-fno-strict-aliasing",
89  ]
90  if (is_standard_system) {
91    external_deps = [
92      "hiviewdfx_hilog_native:libhilog",
93      "utils_base:utils",
94    ]
95  } else {
96    external_deps = [ "hilog:libhilog" ]
97  }
98}
99