1# Copyright (c) 2022-2025 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("//foundation/ability/ability_runtime/ability_runtime.gni") 16module_output_path = "ability_runtime/ability_runtime/ability_call_test" 17 18############################################################################### 19config("module_private_config") { 20 visibility = [ ":*" ] 21 cflags = [] 22 if (target_cpu == "arm") { 23 cflags += [ "-DBINDER_IPC_32BIT" ] 24 } 25 include_dirs = [ "${ability_runtime_test_path}/mock/frameworks_kits_ability_ability_runtime_test/AMS" ] 26} 27 28ohos_moduletest("ability_caller_fw_module_test") { 29 module_out_path = module_output_path 30 sources = [ 31 "${ability_runtime_test_path}/mock/frameworks_kits_ability_ability_runtime_test/AMS/mock_ability_manager_client.cpp", 32 "${ability_runtime_test_path}/mock/frameworks_kits_ability_ability_runtime_test/AMS/mock_serviceability_manager_service.cpp", 33 "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include/sys_mgr_client_mock.cpp", 34 "ability_caller_fw_module_test.cpp", 35 ] 36 37 configs = [ ":module_private_config" ] 38 39 deps = [ 40 "${ability_runtime_innerkits_path}/ability_manager:ability_connect_callback_stub", 41 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 42 "${ability_runtime_innerkits_path}/runtime:runtime", 43 "${ability_runtime_native_path}/ability:ability_context_native", 44 "${ability_runtime_native_path}/ability/native:abilitykit_native", 45 "${ability_runtime_path}/services/abilitymgr:abilityms_target", 46 "${ability_runtime_services_path}/abilitymgr:abilityms", 47 ] 48 49 external_deps = [ 50 "ability_base:session_info", 51 "ability_base:want", 52 "c_utils:utils", 53 "common_event_service:cesfwk_innerkits", 54 "eventhandler:libeventhandler", 55 "form_fwk:fmskit_native", 56 "googletest:gmock_main", 57 "googletest:gtest_main", 58 "hilog:libhilog", 59 "ipc:ipc_core", 60 "ipc:ipc_napi", 61 "napi:ace_napi", 62 "samgr:samgr_proxy", 63 "window_manager:sms", 64 ] 65} 66 67################################################################################ 68group("moduletest") { 69 testonly = true 70 71 deps = [] 72 deps += [ ":ability_caller_fw_module_test" ] 73} 74