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_aafwk.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    "${ability_base_path}/interfaces/inner_api/base/include",
29    "${ability_base_path}/interfaces/kits/native/uri/include",
30    "${ability_base_path}/interfaces/kits/native/want/include",
31    "${ability_out_base_path}/notification/common_event_service/interfaces/inner_api",
32    "${ability_json_path}/notification/common_event_service/interfaces/inner_api",
33    "../../../services/interface/include",
34    "../include",
35    "../../../interfaces/innerkits/acfwk/include",
36    "../../../services/aams/test/mock/include",
37    "../../../services/test/mock",
38    "../../../common/log/include",
39  ]
40
41  defines = [
42    "AAMS_LOG_TAG = \"accessibility_test\"",
43    "AAMS_LOG_DOMAIN = 0xD001D05",
44  ]
45}
46
47ohos_unittest("ac_unit_test") {
48  module_out_path = module_output_path
49  sources = [
50    "../../../services/test/mock/mock_accessible_ability_manager_service_stub.cpp",
51    "../../../services/test/mock/mock_parameter.c",
52    "../src/accessibility_config.cpp",
53    "../src/accessibility_config_impl.cpp",
54    "mock/src/mock_service_registry.cpp",
55    "unittest/accessibility_config_impl_test.cpp",
56  ]
57
58  configs = [
59    ":module_private_config",
60    "../../../resources/config/build:coverage_flags",
61  ]
62
63  deps = [
64    "../../../../../../third_party/googletest:gmock_main",
65    "../../../../../../third_party/googletest:gtest_main",
66    "../../../common/interface:accessibility_interface",
67    "../../../interfaces/innerkits/common:accessibility_common",
68  ]
69
70  external_deps = [
71    "ability_base:zuri",
72    "ability_runtime:abilitykit_native",
73    "ability_runtime:dataobs_manager",
74    "ability_runtime:extension_manager",
75    "bundle_framework:appexecfwk_base",
76    "bundle_framework:appexecfwk_core",
77    "c_utils:utils",
78    "data_share:datashare_common",
79    "data_share:datashare_consumer",
80    "display_manager:displaymgr",
81    "eventhandler:libeventhandler",
82    "ffrt:libffrt",
83    "hilog:libhilog",
84    "init:libbegetutil",
85    "ipc:ipc_core",
86    "power_manager:powermgr_client",
87    "samgr:samgr_proxy",
88  ]
89}
90
91###############################################################################
92
93group("unittest") {
94  testonly = true
95  deps = []
96
97  deps += [ ":ac_unit_test" ]
98}
99###############################################################################
100