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") 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 include_dirs = [ 27 "../../../common/log/include", 28 "../../aafwk/include", 29 "../../aafwk/test/mock/include", 30 "../../acfwk/include", 31 "../../asacfwk/include", 32 "../../asacfwk/test/mock/include", 33 "../../../interfaces/innerkits/acfwk/include", 34 "../../../interfaces/innerkits/asacfwk/include", 35 "../../../services/test/mock/common", 36 ] 37 defines = [ 38 "AAMS_LOG_DOMAIN = 0xD001D05", 39 "AAMS_LOG_TAG = \"accessibility_test\"", 40 ] 41} 42 43ohos_unittest("asac_unit_test") { 44 module_out_path = module_output_path 45 sources = [ 46 "../../../services/test/mock/mock_accessible_ability_manager_service_stub.cpp", 47 "../../../services/test/mock/mock_bundle_manager.cpp", 48 "../../../services/test/mock/mock_parameter.c", 49 "../../../services/test/mock/mock_service_registry.cpp", 50 "../../aafwk/src/accessibility_element_operator_callback_impl.cpp", 51 "../src/accessibility_element_operator_impl.cpp", 52 "../src/accessibility_system_ability_client_impl.cpp", 53 "unittest/accessibility_element_operator_impl_test.cpp", 54 "unittest/accessibility_system_ability_client_impl_test.cpp", 55 ] 56 57 configs = [ 58 ":module_private_config", 59 "../../../resources/config/build:coverage_flags", 60 ] 61 62 deps = [ 63 "../../../../../../third_party/googletest:gmock_main", 64 "../../../../../../third_party/googletest:gtest_main", 65 "../../../common/interface:accessibility_interface", 66 "../../../interfaces/innerkits/common:accessibility_common", 67 ] 68 69 external_deps = [ 70 "ability_base:want", 71 "ability_base:zuri", 72 "ability_runtime:ability_manager", 73 "ability_runtime:abilitykit_native", 74 "ability_runtime:dataobs_manager", 75 "ability_runtime:extension_manager", 76 "bundle_framework:appexecfwk_base", 77 "bundle_framework:appexecfwk_core", 78 "c_utils:utils", 79 "data_share:datashare_common", 80 "data_share:datashare_consumer", 81 "eventhandler:libeventhandler", 82 "ffrt:libffrt", 83 "hilog:libhilog", 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