• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022-2023 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  include_dirs = [
26    "../../../common/log/include",
27    "../../aafwk/include",
28    "../../aafwk/test/mock/include",
29    "../../acfwk/include",
30    "../../asacfwk/include",
31    "../../asacfwk/test/mock/include",
32    "../../../interfaces/innerkits/acfwk/include",
33    "../../../interfaces/innerkits/asacfwk/include",
34    "../../../services/test/mock/common",
35  ]
36  defines = [
37    "AAMS_LOG_DOMAIN = 0xD001D05",
38    "AAMS_LOG_TAG = \"accessibility_test\"",
39  ]
40}
41
42ohos_unittest("asac_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_bundle_manager.cpp",
47    "../../../services/test/mock/mock_parameter.c",
48    "../../../services/test/mock/mock_service_registry.cpp",
49    "../../aafwk/src/accessibility_element_operator_callback_impl.cpp",
50    "../src/accessibility_element_operator_impl.cpp",
51    "../src/accessibility_system_ability_client_impl.cpp",
52    "unittest/accessibility_element_operator_impl_test.cpp",
53    "unittest/accessibility_system_ability_client_impl_test.cpp",
54  ]
55
56  configs = [
57    ":module_private_config",
58    "../../../resources/config/build:coverage_flags",
59  ]
60
61  deps = [
62    "../../../common/interface:accessibility_interface",
63    "../../../interfaces/innerkits/common:accessibility_common",
64  ]
65
66  external_deps = [
67    "ability_base:want",
68    "ability_base:zuri",
69    "ability_runtime:ability_manager",
70    "ability_runtime:abilitykit_native",
71    "ability_runtime:dataobs_manager",
72    "ability_runtime:extension_manager",
73    "bundle_framework:appexecfwk_base",
74    "bundle_framework:appexecfwk_core",
75    "c_utils:utils",
76    "data_share:datashare_common",
77    "data_share:datashare_consumer",
78    "eventhandler:libeventhandler",
79    "ffrt:libffrt",
80    "googletest:gmock_main",
81    "googletest:gtest_main",
82    "hilog:libhilog",
83    "init:libbegetutil",
84    "ipc:ipc_core",
85    "samgr:samgr_proxy",
86  ]
87}
88
89###############################################################################
90group("unittest") {
91  testonly = true
92  deps = []
93
94  deps += [ ":asac_unit_test" ]
95}
96###############################################################################
97