• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021-2025 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")
15SOURCE_DIR = "../../.."
16
17ohos_unittest("tel_state_registry_test") {
18  part_name = "state_registry"
19  subsystem_name = "telephony"
20  test_module = "tel_state_registry_test"
21  module_out_path = part_name + "/" + part_name + "/" + test_module
22
23  sources = [ "$SOURCE_DIR/test/unittest/state_test/state_registry_test.cpp" ]
24
25  include_dirs = [
26    "$SOURCE_DIR/interfaces/innerkits/notify",
27    "$SOURCE_DIR/frameworks/native/observer/include",
28    "$SOURCE_DIR/frameworks/native/common/include",
29    "$SOURCE_DIR/services/include",
30    "$SOURCE_DIR/services/telephony_ext_wrapper/include",
31  ]
32
33  deps = [
34    "$SOURCE_DIR:tel_state_registry",
35    "$SOURCE_DIR/frameworks/native/observer:tel_state_registry_api",
36  ]
37
38  external_deps = [
39    "ability_base:want",
40    "access_token:libaccesstoken_sdk",
41    "access_token:libnativetoken_shared",
42    "access_token:libtoken_setproc",
43    "c_utils:utils",
44    "common_event_service:cesfwk_innerkits",
45    "core_service:libtel_common",
46    "core_service:tel_core_service_api",
47    "hilog:libhilog",
48    "init:libbegetutil",
49    "ipc:ipc_core",
50    "safwk:system_ability_fwk",
51    "samgr:samgr_proxy",
52  ]
53
54  defines = [
55    "TELEPHONY_LOG_TAG = \"StateRegistryTest\"",
56    "LOG_DOMAIN = 0xD000F00",
57  ]
58}
59
60ohos_unittest("tel_state_registry_branch_test") {
61  part_name = "state_registry"
62  subsystem_name = "telephony"
63  test_module = "tel_state_registry_test"
64  module_out_path = part_name + "/" + test_module
65
66  sources =
67      [ "$SOURCE_DIR/test/unittest/state_test/state_registry_branch_test.cpp" ]
68
69  include_dirs = [
70    "$SOURCE_DIR/interfaces/innerkits/notify",
71    "$SOURCE_DIR/frameworks/native/observer/include",
72    "$SOURCE_DIR/frameworks/native/common/include",
73    "$SOURCE_DIR/services/include",
74    "$SOURCE_DIR/services/telephony_ext_wrapper/include",
75  ]
76
77  deps = [
78    "$SOURCE_DIR:tel_state_registry",
79    "$SOURCE_DIR/frameworks/native/observer:tel_state_registry_api",
80  ]
81
82  external_deps = [
83    "ability_base:want",
84    "access_token:libaccesstoken_sdk",
85    "access_token:libnativetoken_shared",
86    "access_token:libtoken_setproc",
87    "c_utils:utils",
88    "common_event_service:cesfwk_innerkits",
89    "core_service:libtel_common",
90    "core_service:tel_core_service_api",
91    "hilog:libhilog",
92    "init:libbegetutil",
93    "ipc:ipc_core",
94    "safwk:system_ability_fwk",
95    "samgr:samgr_proxy",
96  ]
97
98  defines = [
99    "TELEPHONY_LOG_TAG = \"StateRegistryTest\"",
100    "LOG_DOMAIN = 0xD000F00",
101  ]
102}
103
104group("unittest") {
105  testonly = true
106  deps = [
107    ":tel_state_registry_branch_test",
108    ":tel_state_registry_test",
109  ]
110}
111