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