1# Copyright (c) 2023 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/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_innerkits_path}/uri_permission:uri_permission_mgr",
33    "${ability_runtime_services_path}/appmgr:libappms",
34    "${ability_runtime_services_path}/common:event_report",
35    "${ability_runtime_services_path}/common:perm_verification",
36    "${ability_runtime_services_path}/common:task_handler_wrap",
37    "${windowmanager_path}/utils:libwmutil_static",
38    "//third_party/googletest:gmock_main",
39    "//third_party/googletest:gtest_main",
40  ]
41
42  external_deps = [
43    "ability_base:base",
44    "ability_base:configuration",
45    "ability_base:want",
46    "access_token:libaccesstoken_sdk",
47    "appspawn:appspawn_client",
48    "bundle_framework:appexecfwk_base",
49    "bundle_framework:appexecfwk_core",
50    "c_utils:utils",
51    "common_event_service:cesfwk_innerkits",
52    "ffrt:libffrt",
53    "hicollie:libhicollie",
54    "hilog:libhilog",
55    "hisysevent:libhisysevent",
56    "hitrace:hitrace_meter",
57    "init:libbeget_proxy",
58    "init:libbegetutil",
59    "ipc:ipc_core",
60    "kv_store:distributeddata_mgr",
61    "memory_utils:libmeminfo",
62    "safwk:system_ability_fwk",
63    "samgr:samgr_proxy",
64    "window_manager:libwm",
65    "window_manager:libwsutils",
66  ]
67}
68
69group("unittest") {
70  testonly = true
71
72  deps = [ ":app_running_manager_test" ]
73}
74