1885b47fbSopenharmony_ci# Copyright (C) 2022-2023 Huawei Device Co., Ltd.
2885b47fbSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3885b47fbSopenharmony_ci# you may not use this file except in compliance with the License.
4885b47fbSopenharmony_ci# You may obtain a copy of the License at
5885b47fbSopenharmony_ci#
6885b47fbSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7885b47fbSopenharmony_ci#
8885b47fbSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9885b47fbSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10885b47fbSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11885b47fbSopenharmony_ci# See the License for the specific language governing permissions and
12885b47fbSopenharmony_ci# limitations under the License.
13885b47fbSopenharmony_ci
14885b47fbSopenharmony_ciimport("//build/test.gni")
15885b47fbSopenharmony_ciimport("../../../accessibility_aafwk.gni")
16885b47fbSopenharmony_ci
17885b47fbSopenharmony_cimodule_output_path = "accessibility/accessibility"
18885b47fbSopenharmony_ci
19885b47fbSopenharmony_ci###############################################################################
20885b47fbSopenharmony_ciconfig("module_private_config") {
21885b47fbSopenharmony_ci  visibility = [ ":*" ]
22885b47fbSopenharmony_ci  cflags = []
23885b47fbSopenharmony_ci  if (target_cpu == "arm") {
24885b47fbSopenharmony_ci    cflags += [ "-DBINDER_IPC_32BIT" ]
25885b47fbSopenharmony_ci  }
26885b47fbSopenharmony_ci  include_dirs = [
27885b47fbSopenharmony_ci    "../../../common/log/include",
28885b47fbSopenharmony_ci    "../../aafwk/include",
29885b47fbSopenharmony_ci    "../../aafwk/test/mock/include",
30885b47fbSopenharmony_ci    "../../acfwk/include",
31885b47fbSopenharmony_ci    "../../asacfwk/include",
32885b47fbSopenharmony_ci    "../../asacfwk/test/mock/include",
33885b47fbSopenharmony_ci    "../../../interfaces/innerkits/acfwk/include",
34885b47fbSopenharmony_ci    "../../../interfaces/innerkits/asacfwk/include",
35885b47fbSopenharmony_ci    "../../../services/test/mock/common",
36885b47fbSopenharmony_ci  ]
37885b47fbSopenharmony_ci  defines = [
38885b47fbSopenharmony_ci    "AAMS_LOG_DOMAIN = 0xD001D05",
39885b47fbSopenharmony_ci    "AAMS_LOG_TAG = \"accessibility_test\"",
40885b47fbSopenharmony_ci  ]
41885b47fbSopenharmony_ci}
42885b47fbSopenharmony_ci
43885b47fbSopenharmony_ciohos_unittest("asac_unit_test") {
44885b47fbSopenharmony_ci  module_out_path = module_output_path
45885b47fbSopenharmony_ci  sources = [
46885b47fbSopenharmony_ci    "../../../services/test/mock/mock_accessible_ability_manager_service_stub.cpp",
47885b47fbSopenharmony_ci    "../../../services/test/mock/mock_bundle_manager.cpp",
48885b47fbSopenharmony_ci    "../../../services/test/mock/mock_parameter.c",
49885b47fbSopenharmony_ci    "../../../services/test/mock/mock_service_registry.cpp",
50885b47fbSopenharmony_ci    "../../aafwk/src/accessibility_element_operator_callback_impl.cpp",
51885b47fbSopenharmony_ci    "../src/accessibility_element_operator_impl.cpp",
52885b47fbSopenharmony_ci    "../src/accessibility_system_ability_client_impl.cpp",
53885b47fbSopenharmony_ci    "unittest/accessibility_element_operator_impl_test.cpp",
54885b47fbSopenharmony_ci    "unittest/accessibility_system_ability_client_impl_test.cpp",
55885b47fbSopenharmony_ci  ]
56885b47fbSopenharmony_ci
57885b47fbSopenharmony_ci  configs = [
58885b47fbSopenharmony_ci    ":module_private_config",
59885b47fbSopenharmony_ci    "../../../resources/config/build:coverage_flags",
60885b47fbSopenharmony_ci  ]
61885b47fbSopenharmony_ci
62885b47fbSopenharmony_ci  deps = [
63885b47fbSopenharmony_ci    "../../../../../../third_party/googletest:gmock_main",
64885b47fbSopenharmony_ci    "../../../../../../third_party/googletest:gtest_main",
65885b47fbSopenharmony_ci    "../../../common/interface:accessibility_interface",
66885b47fbSopenharmony_ci    "../../../interfaces/innerkits/common:accessibility_common",
67885b47fbSopenharmony_ci  ]
68885b47fbSopenharmony_ci
69885b47fbSopenharmony_ci  external_deps = [
70885b47fbSopenharmony_ci    "ability_base:want",
71885b47fbSopenharmony_ci    "ability_base:zuri",
72885b47fbSopenharmony_ci    "ability_runtime:ability_manager",
73885b47fbSopenharmony_ci    "ability_runtime:abilitykit_native",
74885b47fbSopenharmony_ci    "ability_runtime:dataobs_manager",
75885b47fbSopenharmony_ci    "ability_runtime:extension_manager",
76885b47fbSopenharmony_ci    "bundle_framework:appexecfwk_base",
77885b47fbSopenharmony_ci    "bundle_framework:appexecfwk_core",
78885b47fbSopenharmony_ci    "c_utils:utils",
79885b47fbSopenharmony_ci    "data_share:datashare_common",
80885b47fbSopenharmony_ci    "data_share:datashare_consumer",
81885b47fbSopenharmony_ci    "eventhandler:libeventhandler",
82885b47fbSopenharmony_ci    "ffrt:libffrt",
83885b47fbSopenharmony_ci    "hilog:libhilog",
84885b47fbSopenharmony_ci    "init:libbegetutil",
85885b47fbSopenharmony_ci    "ipc:ipc_core",
86885b47fbSopenharmony_ci    "samgr:samgr_proxy",
87885b47fbSopenharmony_ci  ]
88885b47fbSopenharmony_ci}
89885b47fbSopenharmony_ci
90885b47fbSopenharmony_ci###############################################################################
91885b47fbSopenharmony_cigroup("unittest") {
92885b47fbSopenharmony_ci  testonly = true
93885b47fbSopenharmony_ci  deps = []
94885b47fbSopenharmony_ci
95885b47fbSopenharmony_ci  deps += [ ":asac_unit_test" ]
96885b47fbSopenharmony_ci}
97885b47fbSopenharmony_ci###############################################################################
98