• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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")
15import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
16
17module_output_path = "hdf_core/manager"
18ohos_unittest("hdf_adapter_uhdf_test_manager") {
19  module_out_path = module_output_path
20  include_dirs = [
21    "//drivers/hdf_core/framework/include/platform",
22    "//drivers/hdf_core/framework/include/core",
23    "//drivers/hdf_core/framework/core/common/include/host",
24    "//drivers/hdf_core/framework/core/shared/include",
25    "//drivers/hdf_core/framework/include/osal",
26    "//drivers/hdf_core/framework/include/utils",
27    "//drivers/hdf_core/framework/include",
28    "//drivers/hdf_core/framework/test/unittest/include",
29    "//drivers/hdf_core/framework/test/unittest/manager",
30  ]
31
32  defines = [ "__USER__" ]
33  sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/hdf_lite_manager_test.cpp" ]
34  deps = [
35    "//drivers/hdf_core/adapter/build/test_common:libhdf_test_common",
36    "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils",
37  ]
38  resource_config_file =
39      "//drivers/hdf_core/adapter/uhdf2/test/resource/manager/ohos_test.xml"
40  if (is_standard_system) {
41    external_deps = [
42      "c_utils:utils",
43      "hiviewdfx_hilog_native:libhilog",
44    ]
45  } else {
46    external_deps = [ "hilog:libhilog" ]
47  }
48}
49
50module_output_path = "hdf_core/ioservice"
51ohos_unittest("hdf_adapter_uhdf_test_ioservice") {
52  module_out_path = module_output_path
53  include_dirs = [
54    "//drivers/hdf_core/framework/include/platform",
55    "//drivers/hdf_core/framework/include/core",
56    "//drivers/hdf_core/framework/core/common/include/host",
57    "//drivers/hdf_core/framework/core/shared/include",
58    "//drivers/hdf_core/framework/include/osal",
59    "//drivers/hdf_core/framework/include/utils",
60    "//drivers/hdf_core/framework/include",
61    "//drivers/hdf_core/framework/test/unittest/include",
62    "//drivers/hdf_core/framework/test/unittest/manager",
63  ]
64
65  defines = [ "__USER__" ]
66  sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/hdf_ioservice_test.cpp" ]
67  deps = [ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils" ]
68  if (is_standard_system) {
69    external_deps = [
70      "c_utils:utils",
71      "hiviewdfx_hilog_native:libhilog",
72    ]
73  } else {
74    external_deps = [ "hilog:libhilog" ]
75  }
76}
77module_output_path = "hdf_core/sbuf"
78ohos_unittest("hdf_adapter_uhdf_test_sbuf") {
79  module_out_path = module_output_path
80  include_dirs = [
81    "//drivers/hdf_core/framework/include/osal",
82    "//drivers/hdf_core/framework/include/utils",
83    "//drivers/hdf_core/framework/include",
84    "//drivers/hdf_core/framework/test/unittest/include",
85    "//drivers/hdf_core/framework/test/unittest/manager",
86  ]
87
88  defines = [ "__USER__" ]
89  sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/hdf_sbuf_test.cpp" ]
90  deps = [
91    "$hdf_uhdf_path/ipc:libhdf_ipc_adapter",
92    "$hdf_uhdf_path/utils:libhdf_utils",
93  ]
94  if (is_standard_system) {
95    external_deps = [
96      "c_utils:utils",
97      "hiviewdfx_hilog_native:libhilog",
98    ]
99  } else {
100    external_deps = [ "hilog:libhilog" ]
101  }
102}
103module_output_path = "hdf_core/pm"
104ohos_unittest("hdf_adapter_uhdf_test_pm") {
105  module_out_path = module_output_path
106  include_dirs = [
107    "//drivers/hdf_core/framework/core/shared/include",
108    "//drivers/hdf_core/framework/test/unittest/include",
109    "//drivers/hdf_core/framework/test/unittest/pm",
110  ]
111
112  defines = [ "__USER__" ]
113  sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/hdf_pm_test.cpp" ]
114  deps = [ "//drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils" ]
115  if (is_standard_system) {
116    external_deps = [
117      "c_utils:utils",
118      "hiviewdfx_hilog_native:libhilog",
119    ]
120  } else {
121    external_deps = [ "hilog:libhilog" ]
122  }
123}
124
125module_output_path = "hdf_core/uevent"
126ohos_unittest("hdf_adapter_uhdf_test_uevent") {
127  module_out_path = module_output_path
128  include_dirs = [ "//drivers/hdf_core/framework/core/shared/include" ]
129
130  defines = [ "__USER__" ]
131  sources = [ "//drivers/hdf_core/framework/core/manager/test/unittest/common/devmgr_uevent_test.cpp" ]
132
133  if (is_standard_system) {
134    external_deps = [
135      "c_utils:utils",
136      "hdf_core:libhdf_utils",
137      "hdf_core:libhdi",
138      "hiviewdfx_hilog_native:libhilog",
139    ]
140  } else {
141    external_deps = [ "hilog:libhilog" ]
142  }
143}
144