1# Copyright (c) 2021 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/ohos.gni") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17config("aakit_mock_config") { 18 include_dirs = [ 19 "${ability_runtime_test_path}/mock/services_abilitymgr_test/libs/aakit/include", 20 "${ability_runtime_innerkits_path}/ability_manager/include", 21 "${ability_runtime_services_path}/abilitymgr/include/utils", 22 "${ability_runtime_services_path}/abilitymgr/include", 23 "${ability_runtime_innerkits_path}/app_manager/include", 24 "${ability_runtime_path}/interfaces/kits/native/ability/native/", 25 "include/", 26 "${ability_runtime_services_path}/common/include/", 27 ] 28} 29 30ohos_static_library("aakit_mock") { 31 sanitize = { 32 cfi = true 33 cfi_cross_dso = true 34 debug = false 35 blocklist = "../../../../cfi_blocklist.txt" 36 } 37 branch_protector_ret = "pac_ret" 38 39 sources = [ 40 "src/ability_scheduler.cpp", 41 "src/mock_ability_connect_callback.cpp", 42 ] 43 44 configs = [ ":aakit_mock_config" ] 45 cflags = [] 46 if (target_cpu == "arm") { 47 cflags += [ "-DBINDER_IPC_32BIT" ] 48 } 49 deps = [ "${ability_runtime_innerkits_path}/app_manager:app_manager" ] 50 external_deps = [ 51 "ability_base:base", 52 "ability_base:configuration", 53 "ability_base:session_info", 54 "ability_base:want", 55 "bundle_framework:appexecfwk_base", 56 "bundle_framework:appexecfwk_core", 57 "c_utils:utils", 58 "ffrt:libffrt", 59 "hilog:libhilog", 60 "image_framework:image_native", 61 "ipc:ipc_core", 62 "jsoncpp:jsoncpp", 63 "safwk:system_ability_fwk", 64 "samgr:samgr_proxy", 65 ] 66 67 subsystem_name = "ability" 68 part_name = "ability_runtime" 69} 70