• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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")
16
17module_output_path = "ability_runtime/ability_runtime/abilitymgr"
18
19ohos_unittest("keep_alive_process_manager_test") {
20  module_out_path = module_output_path
21
22  include_dirs = [
23    "mock/include",
24    "${ability_runtime_services_path}/abilitymgr/include/utils",
25    "${ability_runtime_services_path}/abilitymgr/include/keep_alive",
26  ]
27
28  sources = [
29    "${ability_runtime_services_path}/abilitymgr/src/keep_alive/keep_alive_info.cpp",
30    "${ability_runtime_services_path}/abilitymgr/src/keep_alive/keep_alive_process_manager.cpp",
31    "keep_alive_process_manager_test.cpp",
32    "mock/src/ability_keep_alive_service.cpp",
33    "mock/src/ability_manager_service.cpp",
34    "mock/src/app_mgr_client.cpp",
35    "mock/src/app_scheduler.cpp",
36    "mock/src/bundle_mgr_helper.cpp",
37    "mock/src/main_element_utils.cpp",
38    "mock/src/mock_my_flag.cpp",
39    "mock/src/parameters.cpp",
40    "mock/src/permission_verification.cpp",
41  ]
42
43  configs = [ "${ability_runtime_services_path}/abilitymgr:abilityms_config" ]
44  cflags = []
45  if (target_cpu == "arm") {
46    cflags += [ "-DBINDER_IPC_32BIT" ]
47  }
48  deps = [ "${ability_runtime_services_path}/abilitymgr:abilityms" ]
49
50  external_deps = [
51    "bundle_framework:appexecfwk_base",
52    "bundle_framework:appexecfwk_core",
53    "c_utils:utils",
54    "ffrt:libffrt",
55    "googletest:gtest_main",
56    "hilog:libhilog",
57    "hitrace:hitrace_meter",
58    "init:libbeget_proxy",
59    "ipc:ipc_core",
60  ]
61
62  if (ability_runtime_child_process) {
63    defines = [ "SUPPORT_CHILD_PROCESS" ]
64  }
65}
66
67group("unittest") {
68  testonly = true
69
70  deps = [ ":keep_alive_process_manager_test" ]
71}
72