• 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")
15import(
16    "//foundation/distributedhardware/distributed_hardware_fwk/distributedhardwarefwk.gni")
17
18module_out_path = unittest_output_path
19
20config("module_private_config") {
21  include_dirs = [
22    "${utils_path}/include",
23    "${common_path}/utils/include",
24    "${common_path}/log/include",
25    "${services_path}/distributedhardwarefwkservice/include",
26    "${services_path}/distributedhardwarefwkservice/include/utils",
27    "${services_path}/distributedhardwarefwkservice/include/accessmanager",
28    "${services_path}/distributedhardwarefwkservice/include/resourcemanager",
29  ]
30}
31
32ohos_unittest("AccessManagerTest") {
33  module_out_path = module_out_path
34
35  sources = [ "access_manager_test.cpp" ]
36
37  configs = [ ":module_private_config" ]
38
39  deps = [
40    "${services_path}/distributedhardwarefwkservice:distributedhardwarefwksvr",
41    "${utils_path}:distributedhardwareutils",
42  ]
43
44  defines = [
45    "HI_LOG_ENABLE",
46    "DH_LOG_TAG=\"dhfwksvr\"",
47    "LOG_DOMAIN=0xD004100",
48  ]
49
50  cflags = [
51    "-Wall",
52    "-Werror",
53    "-g3",
54    "-Dprivate=public",
55  ]
56
57  external_deps = [
58    "cJSON:cjson",
59    "c_utils:utils",
60    "device_manager:devicemanagersdk",
61    "eventhandler:libeventhandler",
62    "hilog:libhilog",
63    "hisysevent:libhisysevent",
64    "hitrace:hitrace_meter",
65    "init:libbegetutil",
66    "ipc:ipc_core",
67    "kv_store:distributeddata_inner",
68    "safwk:system_ability_fwk",
69    "samgr:samgr_proxy",
70  ]
71}
72
73group("unittest") {
74  testonly = true
75
76  deps = [ ":AccessManagerTest" ]
77}
78