• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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("../../../accessibility_manager_service.gni")
16
17module_output_path = "accessibility/accessibility"
18
19###############################################################################
20config("module_private_config") {
21  visibility = [ ":*" ]
22  cflags = []
23  if (target_cpu == "arm") {
24    cflags += [ "-DBINDER_IPC_32BIT" ]
25  }
26
27  include_dirs = [
28    "../../../services/interface/include",
29    "../include",
30    "../../../interfaces/innerkits/acfwk/include",
31    "../../../services/aams/test/mock/include",
32    "../../../services/test/mock",
33    "../../../common/log/include",
34  ]
35
36  defines = [
37    "AAMS_LOG_TAG = \"accessibility_test\"",
38    "AAMS_LOG_DOMAIN = 0xD001D05",
39  ]
40}
41
42ohos_unittest("ac_unit_test") {
43  module_out_path = module_output_path
44  sources = [
45    "../../../services/test/mock/mock_accessible_ability_manager_service_stub.cpp",
46    "../../../services/test/mock/mock_parameter.c",
47    "../src/accessibility_config.cpp",
48    "../src/accessibility_config_impl.cpp",
49    "mock/src/mock_service_registry.cpp",
50    "unittest/accessibility_config_impl_test.cpp",
51  ]
52
53  configs = [
54    ":module_private_config",
55    "../../../resources/config/build:coverage_flags",
56  ]
57
58  deps = [
59    "../../../common/interface:accessibility_interface",
60    "../../../interfaces/innerkits/common:accessibility_common",
61  ]
62
63  external_deps = [
64    "ability_base:zuri",
65    "ability_runtime:abilitykit_native",
66    "ability_runtime:dataobs_manager",
67    "ability_runtime:extension_manager",
68    "bundle_framework:appexecfwk_base",
69    "bundle_framework:appexecfwk_core",
70    "c_utils:utils",
71    "data_share:datashare_common",
72    "data_share:datashare_consumer",
73    "eventhandler:libeventhandler",
74    "ffrt:libffrt",
75    "googletest:gmock_main",
76    "googletest:gtest_main",
77    "hilog:libhilog",
78    "init:libbegetutil",
79    "ipc:ipc_core",
80    "power_manager:powermgr_client",
81    "samgr:dynamic_cache",
82    "samgr:samgr_proxy",
83  ]
84
85  if (accessibility_feature_display_manager) {
86    external_deps += [ "display_manager:displaymgr" ]
87  }
88}
89
90###############################################################################
91
92group("unittest") {
93  testonly = true
94  deps = []
95
96  deps += [ ":ac_unit_test" ]
97}
98###############################################################################
99