• 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("./../../../../adapter/uhdf2/uhdf.gni")
16
17module_output_path = "hdf_core/srvmgr"
18
19###########################palTest###########################
20
21ohos_unittest("HdiServiceManagerTest") {
22  module_out_path = module_output_path
23  sources = [ "servmgr/service_manager_hdi_c_test.cpp" ]
24
25  deps = [
26    "$hdf_uhdf_path/hdi:libhdi",
27    "$hdf_uhdf_path/ipc:libhdf_ipc_adapter",
28    "$hdf_uhdf_path/utils:libhdf_utils",
29    "//third_party/googletest:gmock_main",
30    "//third_party/googletest:gtest_main",
31  ]
32
33  include_dirs = [
34    "$hdf_uhdf_path/host/test/unittest/sample_driver",
35    "$hdf_uhdf_path/utils/include",
36  ]
37
38  external_deps = [
39    "c_utils:utils",
40    "hilog:libhilog",
41    "ipc:ipc_single",
42  ]
43}
44
45ohos_unittest("HdiServiceManagerTestCC") {
46  module_out_path = module_output_path
47  include_dirs = [
48    "$hdf_framework_path/core/shared/include",
49    "$hdf_uhdf_path/host/test/unittest/sample_driver",
50  ]
51  sources = [ "servmgr/service_manager_hdi_test.cpp" ]
52
53  deps = [
54    "$hdf_uhdf_path/hdi:libhdi",
55    "$hdf_uhdf_path/utils:libhdf_utils",
56    "//third_party/googletest:gmock_main",
57    "//third_party/googletest:gtest_main",
58  ]
59
60  external_deps = [
61    "c_utils:utils",
62    "hilog:libhilog",
63    "ipc:ipc_single",
64    "samgr:samgr_proxy",
65  ]
66}
67
68###########################end###########################
69group("unittest") {
70  testonly = true
71  deps = [
72    ":HdiServiceManagerTest",
73    ":HdiServiceManagerTestCC",
74    "./../../../../adapter/uhdf2/hdi/test/buffer_handle:hdi_buffer_handle_test",
75    "smq_test:HdiSmqTest",
76    "stub_collector:stub_collector_test",
77  ]
78}
79