• 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")
15
16module_output_path = "accessibility/accessibility"
17
18###############################################################################
19config("module_private_config") {
20  visibility = [ ":*" ]
21  cflags = []
22  if (target_cpu == "arm") {
23    cflags += [ "-DBINDER_IPC_32BIT" ]
24  }
25
26  include_dirs = [
27    "../../../services/interface/include",
28    "../include",
29    "../../../interfaces/innerkits/acfwk/include",
30    "../../../services/aams/test/mock/include",
31    "../../../services/test/mock",
32    "../../../common/log/include",
33  ]
34
35  defines = [
36    "AAMS_LOG_TAG = \"accessibility_test\"",
37    "AAMS_LOG_DOMAIN = 0xD001D05",
38  ]
39}
40
41ohos_unittest("ac_unit_test") {
42  module_out_path = module_output_path
43  sources = [
44    "../../../services/test/mock/mock_accessible_ability_manager_service_stub.cpp",
45    "../../../services/test/mock/mock_parameter.c",
46    "../src/accessibility_config.cpp",
47    "../src/accessibility_config_impl.cpp",
48    "mock/src/mock_service_registry.cpp",
49    "unittest/accessibility_config_impl_test.cpp",
50  ]
51
52  configs = [
53    ":module_private_config",
54    "../../../resources/config/build:coverage_flags",
55  ]
56
57  deps = [
58    "../../../common/interface:accessibility_interface",
59    "../../../interfaces/innerkits/common:accessibility_common",
60  ]
61
62  external_deps = [
63    "ability_base:zuri",
64    "ability_runtime:abilitykit_native",
65    "ability_runtime:dataobs_manager",
66    "ability_runtime:extension_manager",
67    "bundle_framework:appexecfwk_base",
68    "bundle_framework:appexecfwk_core",
69    "c_utils:utils",
70    "data_share:datashare_common",
71    "data_share:datashare_consumer",
72    "display_manager:displaymgr",
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:samgr_proxy",
82  ]
83}
84
85###############################################################################
86
87group("unittest") {
88  testonly = true
89  deps = []
90
91  deps += [ ":ac_unit_test" ]
92}
93###############################################################################
94