1600cc4afSopenharmony_ci# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
2600cc4afSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3600cc4afSopenharmony_ci# you may not use this file except in compliance with the License.
4600cc4afSopenharmony_ci# You may obtain a copy of the License at
5600cc4afSopenharmony_ci#
6600cc4afSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7600cc4afSopenharmony_ci#
8600cc4afSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9600cc4afSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10600cc4afSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11600cc4afSopenharmony_ci# See the License for the specific language governing permissions and
12600cc4afSopenharmony_ci# limitations under the License.
13600cc4afSopenharmony_ci
14600cc4afSopenharmony_ciimport("../../../appexecfwk.gni")
15600cc4afSopenharmony_ci
16600cc4afSopenharmony_ciconfig("bundlemgr_test_config") {
17600cc4afSopenharmony_ci  include_dirs = [
18600cc4afSopenharmony_ci    "${inner_api_path}/appexecfwk_base/include",
19600cc4afSopenharmony_ci    "${inner_api_path}/appexecfwk_base/include/bundle_resource",
20600cc4afSopenharmony_ci    "${inner_api_path}/appexecfwk_base/include/distributed_manager",
21600cc4afSopenharmony_ci    "${inner_api_path}/appexecfwk_base/include/free_install",
22600cc4afSopenharmony_ci    "${inner_api_path}/appexecfwk_base/include/quick_fix",
23600cc4afSopenharmony_ci    "${inner_api_path}/appexecfwk_core/include/bundlemgr",
24600cc4afSopenharmony_ci    "${inner_api_path}/appexecfwk_core/include/distributed_manager",
25600cc4afSopenharmony_ci    "${inner_api_path}/appexecfwk_core/include/free_install",
26600cc4afSopenharmony_ci    "${bundle_framework_path}/services/bundlemgr/include/overlay",
27600cc4afSopenharmony_ci    "${bundle_framework_path}/services/bundlemgr/include/sandbox_app",
28600cc4afSopenharmony_ci    "${bundle_framework_path}/services/bundlemgr/include/shared",
29600cc4afSopenharmony_ci    "mock/include",
30600cc4afSopenharmony_ci  ]
31600cc4afSopenharmony_ci
32600cc4afSopenharmony_ci  if (bundle_framework_free_install) {
33600cc4afSopenharmony_ci    include_dirs += [
34600cc4afSopenharmony_ci      "${inner_api_path}/appexecfwk_base/include/aging",
35600cc4afSopenharmony_ci      "${inner_api_path}/appexecfwk_base/include/distributed_manager",
36600cc4afSopenharmony_ci      "${inner_api_path}/appexecfwk_base/include/free_install",
37600cc4afSopenharmony_ci    ]
38600cc4afSopenharmony_ci  }
39600cc4afSopenharmony_ci
40600cc4afSopenharmony_ci  configs = [
41600cc4afSopenharmony_ci    "${services_path}/bundlemgr:bundlemgr_common_config",
42600cc4afSopenharmony_ci    "${common_path}:appexecfwk_common_config",
43600cc4afSopenharmony_ci  ]
44600cc4afSopenharmony_ci}
45600cc4afSopenharmony_ci
46600cc4afSopenharmony_cigroup("unittest") {
47600cc4afSopenharmony_ci  testonly = true
48600cc4afSopenharmony_ci  deps = []
49600cc4afSopenharmony_ci  if (bundle_framework_graphics) {
50600cc4afSopenharmony_ci    deps += [
51600cc4afSopenharmony_ci      "unittest/bms_ability_manager_helper_test:unittest",
52600cc4afSopenharmony_ci      "unittest/bms_app_control_proxy_test:unittest",
53600cc4afSopenharmony_ci      "unittest/bms_bundle_accesstokenid_test:unittest",
54600cc4afSopenharmony_ci      "unittest/bms_bundle_aot_test:unittest",
55600cc4afSopenharmony_ci      "unittest/bms_bundle_app_control_test:unittest",
56600cc4afSopenharmony_ci      "unittest/bms_bundle_app_provision_info_test:unittest",
57600cc4afSopenharmony_ci      "unittest/bms_bundle_clone_app_test:unittest",
58600cc4afSopenharmony_ci      "unittest/bms_bundle_clone_installer_test:unittest",
59600cc4afSopenharmony_ci      "unittest/bms_bundle_common_test:unittest",
60600cc4afSopenharmony_ci      "unittest/bms_bundle_crowdtesting_test:unittest",
61600cc4afSopenharmony_ci      "unittest/bms_bundle_data_group_test:unittest",
62600cc4afSopenharmony_ci      "unittest/bms_bundle_data_storage_test:unittest",
63600cc4afSopenharmony_ci      "unittest/bms_bundle_dependencies_test:unittest",
64600cc4afSopenharmony_ci      "unittest/bms_bundle_exception_handler_test:unittest",
65600cc4afSopenharmony_ci      "unittest/bms_bundle_hap_verify_test:unittest",
66600cc4afSopenharmony_ci      "unittest/bms_bundle_hsp_test:unittest",
67600cc4afSopenharmony_ci      "unittest/bms_bundle_installer_manager_test:unittest",
68600cc4afSopenharmony_ci      "unittest/bms_bundle_installer_proxy_test:unittest",
69600cc4afSopenharmony_ci      "unittest/bms_bundle_installer_test:unittest",
70600cc4afSopenharmony_ci      "unittest/bms_bundle_installers_test:unittest",
71600cc4afSopenharmony_ci      "unittest/bms_bundle_kit_service_test:unittest",
72600cc4afSopenharmony_ci      "unittest/bms_bundle_manager_test:unittest",
73600cc4afSopenharmony_ci      "unittest/bms_bundle_mgr_proxy_test:unittest",
74600cc4afSopenharmony_ci      "unittest/bms_bundle_mgr_service_death_recipient_test:unittest",
75600cc4afSopenharmony_ci      "unittest/bms_bundle_multiuser_install_test:unittest",
76600cc4afSopenharmony_ci      "unittest/bms_bundle_navigation_test:unittest",
77600cc4afSopenharmony_ci      "unittest/bms_bundle_parser_test:unittest",
78600cc4afSopenharmony_ci      "unittest/bms_bundle_permission_grant_test:unittest",
79600cc4afSopenharmony_ci      "unittest/bms_bundle_quick_fix_mgr_rdb_test:unittest",
80600cc4afSopenharmony_ci      "unittest/bms_bundle_rdb_data_manager_test:unittest",
81600cc4afSopenharmony_ci      "unittest/bms_bundle_resource_info_test:unittest",
82600cc4afSopenharmony_ci      "unittest/bms_bundle_resource_manager_test:unittest",
83600cc4afSopenharmony_ci      "unittest/bms_bundle_resource_test:unittest",
84600cc4afSopenharmony_ci      "unittest/bms_bundle_sandbox_app_test:unittest",
85600cc4afSopenharmony_ci      "unittest/bms_bundle_stream_installer_host_impl:unittest",
86600cc4afSopenharmony_ci      "unittest/bms_bundle_uninstaller_test:unittest",
87600cc4afSopenharmony_ci      "unittest/bms_bundle_updater_test:unittest",
88600cc4afSopenharmony_ci      "unittest/bms_bundle_verifymanager_test:unittest",
89600cc4afSopenharmony_ci      "unittest/bms_data_mgr_test:unittest",
90600cc4afSopenharmony_ci      "unittest/bms_event_handler_test:unittest",
91600cc4afSopenharmony_ci      "unittest/bms_extend_resource_manager_test:unittest",
92600cc4afSopenharmony_ci      "unittest/bms_install_daemon_test:unittest",
93600cc4afSopenharmony_ci      "unittest/bms_installd_client_test:unittest",
94600cc4afSopenharmony_ci      "unittest/bms_installd_host_test:unittest",
95600cc4afSopenharmony_ci      "unittest/bms_patch_parser_test:unittest",
96600cc4afSopenharmony_ci      "unittest/bms_rdb_data_manager_test:unittest",
97600cc4afSopenharmony_ci      "unittest/bms_service_bundle_scan_test:unittest",
98600cc4afSopenharmony_ci      "unittest/bms_service_startup_test:unittest",
99600cc4afSopenharmony_ci      "unittest/bms_syscap_tool_test:unittest",
100600cc4afSopenharmony_ci    ]
101600cc4afSopenharmony_ci    if (bundle_framework_default_app) {
102600cc4afSopenharmony_ci      deps += [ "unittest/bms_bundle_default_app_test:unittest" ]
103600cc4afSopenharmony_ci    }
104600cc4afSopenharmony_ci    if (bundle_framework_quick_fix) {
105600cc4afSopenharmony_ci      deps += [
106600cc4afSopenharmony_ci        "unittest/bms_bundle_quick_fix_boot_scanner_test:unittest",
107600cc4afSopenharmony_ci        "unittest/bms_bundle_quick_fix_deleter_test:unittest",
108600cc4afSopenharmony_ci        "unittest/bms_bundle_quick_fix_manager_test:unittest",
109600cc4afSopenharmony_ci        "unittest/bms_bundle_quick_fix_query_test:unittest",
110600cc4afSopenharmony_ci        "unittest/bms_bundle_quick_fix_switcher_test:unittest",
111600cc4afSopenharmony_ci        "unittest/bms_bundle_quick_fix_test:unittest",
112600cc4afSopenharmony_ci      ]
113600cc4afSopenharmony_ci    }
114600cc4afSopenharmony_ci    if (bundle_framework_overlay_install) {
115600cc4afSopenharmony_ci      deps += [ "unittest/bms_bundle_overlay_test:unittest" ]
116600cc4afSopenharmony_ci    }
117600cc4afSopenharmony_ci  }
118600cc4afSopenharmony_ci  if (bundle_framework_free_install && bundle_framework_graphics) {
119600cc4afSopenharmony_ci    deps += [
120600cc4afSopenharmony_ci      "unittest/bms_bundle_free_install_test:unittest",
121600cc4afSopenharmony_ci      "unittest/bms_bundle_kit_service_base_test:unittest",
122600cc4afSopenharmony_ci    ]
123600cc4afSopenharmony_ci  }
124600cc4afSopenharmony_ci}
125