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 "../../../common/interface/src/api_event_reporter.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 "../../../common/interface:accessibility_interface", 64 "../../../interfaces/innerkits/common:accessibility_common", 65 ] 66 67 external_deps = [ 68 "ability_base:want", 69 "ability_base:zuri", 70 "ability_runtime:ability_manager", 71 "ability_runtime:abilitykit_native", 72 "ability_runtime:dataobs_manager", 73 "ability_runtime:extension_manager", 74 "bundle_framework:appexecfwk_base", 75 "bundle_framework:appexecfwk_core", 76 "c_utils:utils", 77 "data_share:datashare_common", 78 "data_share:datashare_consumer", 79 "e2fsprogs:libext2_uuid", 80 "eventhandler:libeventhandler", 81 "ffrt:libffrt", 82 "googletest:gmock_main", 83 "googletest:gtest_main", 84 "hilog:libhilog", 85 "init:libbegetutil", 86 "ipc:ipc_core", 87 "samgr:dynamic_cache", 88 "samgr:samgr_proxy", 89 ] 90 91 if (product_name != "qemu-arm-linux-min") { 92 external_deps += [ "hiappevent:hiappevent_innerapi" ] 93 } 94} 95 96############################################################################### 97group("unittest") { 98 testonly = true 99 deps = [] 100 101 deps += [ ":asac_unit_test" ] 102} 103############################################################################### 104