• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-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/appmgrservice"
18
19ohos_unittest("app_running_manager_test") {
20  module_out_path = module_output_path
21
22  include_dirs = [ "${ability_runtime_services_path}/appmgr/include" ]
23
24  configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ]
25
26  sources = [ "${ability_runtime_services_path}/appmgr/src/window_visibility_changed_listener.cpp" ]
27  sources += [ "app_running_manager_test.cpp" ]
28
29  deps = [
30    "${ability_runtime_innerkits_path}/app_manager:app_manager",
31    "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
32    "${ability_runtime_services_path}/appmgr:libappms",
33    "${ability_runtime_services_path}/common:event_report",
34    "${ability_runtime_services_path}/common:perm_verification",
35    "${ability_runtime_services_path}/common:task_handler_wrap",
36  ]
37
38  external_deps = [
39    "ability_base:base",
40    "ability_base:configuration",
41    "ability_base:want",
42    "access_token:libaccesstoken_sdk",
43    "appspawn:appspawn_client",
44    "bundle_framework:appexecfwk_base",
45    "bundle_framework:appexecfwk_core",
46    "c_utils:utils",
47    "common_event_service:cesfwk_innerkits",
48    "ffrt:libffrt",
49    "googletest:gmock_main",
50    "googletest:gtest_main",
51    "hicollie:libhicollie",
52    "hilog:libhilog",
53    "hisysevent:libhisysevent",
54    "hitrace:hitrace_meter",
55    "init:libbeget_proxy",
56    "init:libbegetutil",
57    "ipc:ipc_core",
58    "kv_store:distributeddata_mgr",
59    "memory_utils:libmeminfo",
60    "safwk:system_ability_fwk",
61    "samgr:samgr_proxy",
62    "window_manager:libwmutil",
63    "window_manager:libwmutil_static",
64    "window_manager:libwmutil_base",
65  ]
66
67  defines = []
68  if (ability_runtime_child_process) {
69    defines += [ "SUPPORT_CHILD_PROCESS" ]
70  }
71
72  if (ability_runtime_graphics) {
73    external_deps += [
74      "window_manager:libwm",
75      "window_manager:libwsutils",
76    ]
77    defines += [ "SUPPORT_SCREEN" ]
78  }
79  if (ability_runtime_upms) {
80    deps += [
81      "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
82    ]
83  }
84}
85
86group("unittest") {
87  testonly = true
88
89  deps = [ ":app_running_manager_test" ]
90}
91