• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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 = "//base/telephony/state_registry"
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 + "/" + test_module
22
23  sources = [
24    "$SOURCE_DIR/test/unittest/state_test/state_registry_test.cpp",
25    "//base/telephony/core_service/frameworks/native/src/telephony_state_registry_client.cpp",
26    "//base/telephony/core_service/frameworks/native/src/telephony_state_registry_proxy.cpp",
27  ]
28
29  include_dirs = [
30    "$SOURCE_DIR/interfaces/innerkits/notify",
31    "$SOURCE_DIR/frameworks/native/observer/include",
32    "$SOURCE_DIR/frameworks/native/common/include",
33    "$SOURCE_DIR/service/include",
34  ]
35
36  configs = [ "//base/telephony/core_service/utils:telephony_log_config" ]
37
38  deps = [ "//base/telephony/state_registry/frameworks/native/observer:tel_state_registry_api" ]
39
40  external_deps = [
41    "access_token:libaccesstoken_sdk",
42    "access_token:libnativetoken",
43    "access_token:libtoken_setproc",
44    "c_utils:utils",
45    "core_service:tel_core_service_api",
46    "init:libbegetutil",
47    "ipc:ipc_core",
48    "safwk:system_ability_fwk",
49    "samgr:samgr_proxy",
50  ]
51
52  defines = [
53    "TELEPHONY_LOG_TAG = \"StateRegistryTest\"",
54    "LOG_DOMAIN = 0xD000F00",
55  ]
56
57  if (is_standard_system) {
58    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
59  } else {
60    external_deps += [ "hilog:libhilog" ]
61  }
62}
63
64group("unittest") {
65  testonly = true
66  deps = [ ":tel_state_registry_test" ]
67}
68