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.
13import("//build/test.gni")
14import("//foundation/ability/ability_runtime/ability_runtime.gni")
15
16module_output_path = "ability_runtime/abilitymgr"
17
18ohos_unittest("auto_startup_info_test") {
19  module_out_path = module_output_path
20
21  include_dirs = [
22    "${ability_runtime_innerkits_path}/ability_manager/include",
23    "${ability_runtime_abilitymgr_path}/include",
24    "${ability_runtime_services_path}/common/include",
25    "${distributeddatamgr_path}/kv_store/interfaces/innerkits/distributeddata/include",
26  ]
27
28  sources = [
29    "${ability_runtime_services_path}/abilitymgr/src/ability_auto_startup_service.cpp",
30    "${ability_runtime_services_path}/abilitymgr/src/auto_startup_info.cpp",
31    "auto_startup_info_test.cpp",
32  ]
33
34  configs = []
35
36  deps = [
37    "${ability_runtime_abilitymgr_path}/:abilityms",
38    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
39    "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting",
40    "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
41    "${ability_runtime_native_path}/ability:ability_context_native",
42    "${ability_runtime_native_path}/ability/native:auto_startup_callback",
43    "${ability_runtime_services_path}/abilitymgr:abilityms",
44    "${ability_runtime_services_path}/common:perm_verification",
45    "//third_party/googletest:gtest_main",
46  ]
47
48  external_deps = [
49    "ability_base:want",
50    "ability_base:zuri",
51    "ability_runtime:ability_manager",
52    "access_token:libaccesstoken_sdk",
53    "bundle_framework:appexecfwk_base",
54    "bundle_framework:appexecfwk_core",
55    "c_utils:utils",
56    "common_event_service:cesfwk_innerkits",
57    "ffrt:libffrt",
58    "hilog:libhilog",
59    "ipc:ipc_core",
60    "kv_store:distributeddata_inner",
61  ]
62
63  if (ability_runtime_graphics) {
64    external_deps += [
65      "window_manager:libwsutils",
66      "window_manager:scene_session",
67    ]
68  }
69  cflags_cc = []
70  if (os_dlp_part_enabled) {
71    cflags_cc += [ "-DWITH_DLP" ]
72  }
73}
74
75group("unittest") {
76  testonly = true
77
78  deps = [ ":auto_startup_info_test" ]
79}
80