1# Copyright (c) 2022 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_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    "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
45    "//third_party/googletest:gmock_main",
46    "//third_party/googletest:gtest_main",
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    "hilog:libhilog",
55    "ipc:ipc_core",
56    "napi:ace_napi",
57  ]
58}
59
60################################################################################
61group("moduletest") {
62  testonly = true
63
64  deps = []
65  deps += [ ":ability_caller_fw_module_test" ]
66}
67