1# Copyright (c) 2022-2024 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_manager", 41 "${ability_runtime_native_path}/ability:ability_context_native", 42 "${ability_runtime_native_path}/ability/native:abilitykit_native", 43 "${ability_runtime_services_path}/abilitymgr:abilityms", 44 ] 45 46 external_deps = [ 47 "ability_base:session_info", 48 "ability_base:want", 49 "c_utils:utils", 50 "common_event_service:cesfwk_innerkits", 51 "eventhandler:libeventhandler", 52 "googletest:gmock_main", 53 "googletest:gtest_main", 54 "hilog:libhilog", 55 "ipc:ipc_core", 56 "ipc:ipc_napi", 57 "napi:ace_napi", 58 "samgr:samgr_proxy", 59 ] 60} 61 62################################################################################ 63group("moduletest") { 64 testonly = true 65 66 deps = [] 67 deps += [ ":ability_caller_fw_module_test" ] 68} 69