• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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("../../soc_perf.gni")
16
17module_output_path = "soc_perf/socperftest"
18
19config("module_private_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [
23    "${socperf_common}/include",
24    "${socperf_interfaces}/inner_api/socperf_client/include",
25    "${socperf_services}/core/include",
26  ]
27}
28
29ohos_unittest("SocPerfSubTest") {
30  module_out_path = module_output_path
31
32  sources = [ "socperf_sub_test.cpp" ]
33
34  configs = [ ":module_private_config" ]
35
36  deps = [
37    "${socperf_interfaces}/inner_api/socperf_client:socperf_client",
38    "//third_party/googletest:gtest_main",
39    "//third_party/libxml2:xml2",
40  ]
41
42  external_deps = [
43    "c_utils:utils",
44    "eventhandler:libeventhandler",
45    "hilog:libhilog",
46    "ipc:ipc_single",
47    "safwk:system_ability_fwk",
48    "samgr:samgr_proxy",
49  ]
50}
51
52ohos_unittest("SocPerfSubMockTest") {
53  module_out_path = module_output_path
54
55  sources = [
56    "mock/mock_socperf_client.cpp",
57    "socperf_sub_mock_test.cpp",
58  ]
59
60  configs = [ ":module_private_config" ]
61
62  deps = [
63    "${socperf_interfaces}/inner_api/socperf_client:socperf_client",
64    "//third_party/googletest:gtest_main",
65    "//third_party/libxml2:xml2",
66  ]
67
68  external_deps = [
69    "c_utils:utils",
70    "eventhandler:libeventhandler",
71    "hilog:libhilog",
72    "ipc:ipc_single",
73    "safwk:system_ability_fwk",
74    "samgr:samgr_proxy",
75  ]
76}
77
78group("unittest") {
79  testonly = true
80  deps = [
81    ":SocPerfSubMockTest",
82    ":SocPerfSubTest",
83  ]
84}
85