• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2023 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("./../../uhdf.gni")
16
17hdf_framework_path = "./../../../../framework"
18hdf_uhdf_path = "./../.."
19
20###########################palTest###########################
21ohos_unittest("DevMgrTest") {
22  module_out_path = "hdf_core/devmgr"
23  sources = [ "unittest/devmgr_test.cpp" ]
24
25  include_dirs = [
26    "//commonlibrary/c_utils/base/include",
27    "$hdf_framework_path/include/osal",
28    "$hdf_framework_path/include/utils",
29    "$hdf_framework_path/utils/include",
30    "$hdf_uhdf_path/hdi/include",
31    "$hdf_uhdf_path/include/hidl",
32    "unittest/common/",
33  ]
34
35  deps = [
36    "$hdf_uhdf_path/hdi:libhdi",
37    "$hdf_uhdf_path/host/test/unittest/sample_driver:sample_driver",
38    "$hdf_uhdf_path/utils:libhdf_utils",
39    "//third_party/googletest:gmock_main",
40    "//third_party/googletest:gtest_main",
41  ]
42
43  if (is_standard_system) {
44    external_deps = [
45      "c_utils:utils",
46      "hilog:libhilog",
47    ]
48  } else {
49    external_deps = [ "hilog:libhilog" ]
50  }
51}
52
53ohos_unittest("DevHostTest") {
54  module_out_path = "hdf_core/devhost"
55  sources = [ "unittest/devhost_test.cpp" ]
56
57  include_dirs = [
58    "$hdf_framework_path/core/shared/include",
59    "$hdf_framework_path/core/manager/include",
60    "$hdf_framework_path/include/osal",
61    "$hdf_framework_path/include/utils",
62    "$hdf_framework_path/utils/include",
63    "$hdf_framework_path/core/host/include",
64    "$hdf_uhdf_path/host/include",
65    "$hdf_uhdf_path/manager/include",
66    "$hdf_uhdf_path/ipc/include",
67  ]
68
69  deps = [
70    "$hdf_uhdf_path/host:libhdf_host",
71    "$hdf_uhdf_path/ipc:libhdf_ipc_adapter",
72    "$hdf_uhdf_path/utils:libhdf_utils",
73    "//third_party/googletest:gmock_main",
74    "//third_party/googletest:gtest_main",
75  ]
76
77  if (is_standard_system) {
78    external_deps = [
79      "c_utils:utils",
80      "hilog:libhilog",
81    ]
82  } else {
83    external_deps = [ "hilog:libhilog" ]
84  }
85}
86
87###########################end###########################
88group("unittest") {
89  testonly = true
90  deps = [
91    ":DevHostTest",
92    ":DevMgrTest",
93  ]
94}
95