1545fdf9bSopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2545fdf9bSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3545fdf9bSopenharmony_ci# you may not use this file except in compliance with the License. 4545fdf9bSopenharmony_ci# You may obtain a copy of the License at 5545fdf9bSopenharmony_ci# 6545fdf9bSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7545fdf9bSopenharmony_ci# 8545fdf9bSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9545fdf9bSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10545fdf9bSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11545fdf9bSopenharmony_ci# See the License for the specific language governing permissions and 12545fdf9bSopenharmony_ci# limitations under the License. 13545fdf9bSopenharmony_ci 14545fdf9bSopenharmony_ciimport("//build/test.gni") 15545fdf9bSopenharmony_ciimport("../../../bundletool.gni") 16545fdf9bSopenharmony_ci 17545fdf9bSopenharmony_cimodule_output_path = "bundle_tool/tools" 18545fdf9bSopenharmony_ci 19545fdf9bSopenharmony_ciconfig("tools_bm_config_mock") { 20545fdf9bSopenharmony_ci include_dirs = [ 21545fdf9bSopenharmony_ci "${inner_api_path}/appexecfwk_base/include", 22545fdf9bSopenharmony_ci "${inner_api_path}/appexecfwk_base/include/quick_fix", 23545fdf9bSopenharmony_ci "${inner_api_path}/appexecfwk_core/include/bundlemgr", 24545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr/include", 25545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr/include/navigation", 26545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr/include/quick_fix", 27545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr/include/rdb", 28545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr/include/sandbox_app", 29545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr/include/shared", 30545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr/include/uninstall_data_mgr", 31545fdf9bSopenharmony_ci "${bundletool_test_path}/mock", 32545fdf9bSopenharmony_ci "//third_party/googletest/googlemock/include", 33545fdf9bSopenharmony_ci "//third_party/json/single_include", 34545fdf9bSopenharmony_ci ] 35545fdf9bSopenharmony_ci} 36545fdf9bSopenharmony_ci 37545fdf9bSopenharmony_citools_bm_mock_sources = [ 38545fdf9bSopenharmony_ci "${bundletool_test_path}/mock/mock_bundle_installer_host.cpp", 39545fdf9bSopenharmony_ci "${bundletool_test_path}/mock/mock_bundle_mgr_host.cpp", 40545fdf9bSopenharmony_ci] 41545fdf9bSopenharmony_ci 42545fdf9bSopenharmony_ciohos_unittest("bm_command_dump_test") { 43545fdf9bSopenharmony_ci module_out_path = module_output_path 44545fdf9bSopenharmony_ci 45545fdf9bSopenharmony_ci include_dirs = [] 46545fdf9bSopenharmony_ci 47545fdf9bSopenharmony_ci sources = [ 48545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command.cpp", 49545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command_common.cpp", 50545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_command.cpp", 51545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_status_callback_host_impl.cpp", 52545fdf9bSopenharmony_ci "${bundletool_path}/src/shell_command.cpp", 53545fdf9bSopenharmony_ci "${bundletool_path}/src/status_receiver_impl.cpp", 54545fdf9bSopenharmony_ci "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", 55545fdf9bSopenharmony_ci "bm_command_dump_test.cpp", 56545fdf9bSopenharmony_ci ] 57545fdf9bSopenharmony_ci sources += tools_bm_mock_sources 58545fdf9bSopenharmony_ci 59545fdf9bSopenharmony_ci configs = [ 60545fdf9bSopenharmony_ci "${bundletool_path}:tools_bm_config", 61545fdf9bSopenharmony_ci ":tools_bm_config_mock", 62545fdf9bSopenharmony_ci ] 63545fdf9bSopenharmony_ci 64545fdf9bSopenharmony_ci cflags = [] 65545fdf9bSopenharmony_ci if (target_cpu == "arm") { 66545fdf9bSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 67545fdf9bSopenharmony_ci } 68545fdf9bSopenharmony_ci 69545fdf9bSopenharmony_ci deps = [ 70545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr:libbms", 71545fdf9bSopenharmony_ci "//third_party/googletest:gmock_main", 72545fdf9bSopenharmony_ci "//third_party/googletest:gtest_main", 73545fdf9bSopenharmony_ci ] 74545fdf9bSopenharmony_ci 75545fdf9bSopenharmony_ci external_deps = [ 76545fdf9bSopenharmony_ci "ability_base:want", 77545fdf9bSopenharmony_ci "ability_runtime:app_manager", 78545fdf9bSopenharmony_ci "ability_runtime:quickfix_manager", 79545fdf9bSopenharmony_ci "access_token:libaccesstoken_sdk", 80545fdf9bSopenharmony_ci "appverify:libhapverify", 81545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_base", 82545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_core", 83545fdf9bSopenharmony_ci "bundle_framework:bundle_napi_common", 84545fdf9bSopenharmony_ci "bundle_framework:libappexecfwk_common", 85545fdf9bSopenharmony_ci "c_utils:utils", 86545fdf9bSopenharmony_ci "common_event_service:cesfwk_innerkits", 87545fdf9bSopenharmony_ci "eventhandler:libeventhandler", 88545fdf9bSopenharmony_ci "hilog:libhilog", 89545fdf9bSopenharmony_ci "init:libbegetutil", 90545fdf9bSopenharmony_ci "ipc:ipc_core", 91545fdf9bSopenharmony_ci "kv_store:distributeddata_inner", 92545fdf9bSopenharmony_ci "os_account:os_account_innerkits", 93545fdf9bSopenharmony_ci "relational_store:native_rdb", 94545fdf9bSopenharmony_ci "samgr:samgr_proxy", 95545fdf9bSopenharmony_ci ] 96545fdf9bSopenharmony_ci 97545fdf9bSopenharmony_ci external_deps += bm_install_external_deps 98545fdf9bSopenharmony_ci} 99545fdf9bSopenharmony_ci 100545fdf9bSopenharmony_ciohos_unittest("bm_command_dump_dependencies_test") { 101545fdf9bSopenharmony_ci module_out_path = module_output_path 102545fdf9bSopenharmony_ci 103545fdf9bSopenharmony_ci include_dirs = [] 104545fdf9bSopenharmony_ci 105545fdf9bSopenharmony_ci sources = [ 106545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command.cpp", 107545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command_common.cpp", 108545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_command.cpp", 109545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_status_callback_host_impl.cpp", 110545fdf9bSopenharmony_ci "${bundletool_path}/src/shell_command.cpp", 111545fdf9bSopenharmony_ci "${bundletool_path}/src/status_receiver_impl.cpp", 112545fdf9bSopenharmony_ci "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", 113545fdf9bSopenharmony_ci "bm_command_dump_dependencies_test.cpp", 114545fdf9bSopenharmony_ci ] 115545fdf9bSopenharmony_ci sources += tools_bm_mock_sources 116545fdf9bSopenharmony_ci 117545fdf9bSopenharmony_ci configs = [ 118545fdf9bSopenharmony_ci "${bundletool_path}:tools_bm_config", 119545fdf9bSopenharmony_ci ":tools_bm_config_mock", 120545fdf9bSopenharmony_ci ] 121545fdf9bSopenharmony_ci 122545fdf9bSopenharmony_ci cflags = [] 123545fdf9bSopenharmony_ci if (target_cpu == "arm") { 124545fdf9bSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 125545fdf9bSopenharmony_ci } 126545fdf9bSopenharmony_ci 127545fdf9bSopenharmony_ci deps = [ 128545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr:libbms", 129545fdf9bSopenharmony_ci "//third_party/googletest:gmock_main", 130545fdf9bSopenharmony_ci "//third_party/googletest:gtest_main", 131545fdf9bSopenharmony_ci ] 132545fdf9bSopenharmony_ci 133545fdf9bSopenharmony_ci external_deps = [ 134545fdf9bSopenharmony_ci "ability_base:want", 135545fdf9bSopenharmony_ci "ability_runtime:app_manager", 136545fdf9bSopenharmony_ci "ability_runtime:quickfix_manager", 137545fdf9bSopenharmony_ci "access_token:libaccesstoken_sdk", 138545fdf9bSopenharmony_ci "appverify:libhapverify", 139545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_base", 140545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_core", 141545fdf9bSopenharmony_ci "bundle_framework:bundle_napi_common", 142545fdf9bSopenharmony_ci "bundle_framework:libappexecfwk_common", 143545fdf9bSopenharmony_ci "c_utils:utils", 144545fdf9bSopenharmony_ci "common_event_service:cesfwk_innerkits", 145545fdf9bSopenharmony_ci "eventhandler:libeventhandler", 146545fdf9bSopenharmony_ci "hilog:libhilog", 147545fdf9bSopenharmony_ci "init:libbegetutil", 148545fdf9bSopenharmony_ci "ipc:ipc_core", 149545fdf9bSopenharmony_ci "kv_store:distributeddata_inner", 150545fdf9bSopenharmony_ci "os_account:os_account_innerkits", 151545fdf9bSopenharmony_ci "relational_store:native_rdb", 152545fdf9bSopenharmony_ci "samgr:samgr_proxy", 153545fdf9bSopenharmony_ci ] 154545fdf9bSopenharmony_ci 155545fdf9bSopenharmony_ci external_deps += bm_install_external_deps 156545fdf9bSopenharmony_ci} 157545fdf9bSopenharmony_ci 158545fdf9bSopenharmony_ciohos_unittest("bm_command_install_test") { 159545fdf9bSopenharmony_ci module_out_path = module_output_path 160545fdf9bSopenharmony_ci 161545fdf9bSopenharmony_ci include_dirs = [] 162545fdf9bSopenharmony_ci 163545fdf9bSopenharmony_ci sources = [ 164545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command.cpp", 165545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command_common.cpp", 166545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_command.cpp", 167545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_status_callback_host_impl.cpp", 168545fdf9bSopenharmony_ci "${bundletool_path}/src/shell_command.cpp", 169545fdf9bSopenharmony_ci "${bundletool_path}/src/status_receiver_impl.cpp", 170545fdf9bSopenharmony_ci "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", 171545fdf9bSopenharmony_ci "bm_command_install_test.cpp", 172545fdf9bSopenharmony_ci ] 173545fdf9bSopenharmony_ci sources += tools_bm_mock_sources 174545fdf9bSopenharmony_ci 175545fdf9bSopenharmony_ci configs = [ 176545fdf9bSopenharmony_ci "${bundletool_path}:tools_bm_config", 177545fdf9bSopenharmony_ci ":tools_bm_config_mock", 178545fdf9bSopenharmony_ci ] 179545fdf9bSopenharmony_ci 180545fdf9bSopenharmony_ci cflags = [] 181545fdf9bSopenharmony_ci if (target_cpu == "arm") { 182545fdf9bSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 183545fdf9bSopenharmony_ci } 184545fdf9bSopenharmony_ci 185545fdf9bSopenharmony_ci deps = [ 186545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr:libbms", 187545fdf9bSopenharmony_ci "//third_party/googletest:gmock_main", 188545fdf9bSopenharmony_ci "//third_party/googletest:gtest_main", 189545fdf9bSopenharmony_ci ] 190545fdf9bSopenharmony_ci 191545fdf9bSopenharmony_ci external_deps = [ 192545fdf9bSopenharmony_ci "ability_base:want", 193545fdf9bSopenharmony_ci "ability_runtime:app_manager", 194545fdf9bSopenharmony_ci "ability_runtime:quickfix_manager", 195545fdf9bSopenharmony_ci "access_token:libaccesstoken_sdk", 196545fdf9bSopenharmony_ci "appverify:libhapverify", 197545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_base", 198545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_core", 199545fdf9bSopenharmony_ci "bundle_framework:bundle_napi_common", 200545fdf9bSopenharmony_ci "bundle_framework:libappexecfwk_common", 201545fdf9bSopenharmony_ci "c_utils:utils", 202545fdf9bSopenharmony_ci "common_event_service:cesfwk_innerkits", 203545fdf9bSopenharmony_ci "eventhandler:libeventhandler", 204545fdf9bSopenharmony_ci "hilog:libhilog", 205545fdf9bSopenharmony_ci "init:libbegetutil", 206545fdf9bSopenharmony_ci "ipc:ipc_core", 207545fdf9bSopenharmony_ci "kv_store:distributeddata_inner", 208545fdf9bSopenharmony_ci "os_account:os_account_innerkits", 209545fdf9bSopenharmony_ci "relational_store:native_rdb", 210545fdf9bSopenharmony_ci "samgr:samgr_proxy", 211545fdf9bSopenharmony_ci ] 212545fdf9bSopenharmony_ci 213545fdf9bSopenharmony_ci external_deps += bm_install_external_deps 214545fdf9bSopenharmony_ci} 215545fdf9bSopenharmony_ci 216545fdf9bSopenharmony_ciohos_unittest("bm_command_test") { 217545fdf9bSopenharmony_ci module_out_path = module_output_path 218545fdf9bSopenharmony_ci 219545fdf9bSopenharmony_ci include_dirs = [] 220545fdf9bSopenharmony_ci 221545fdf9bSopenharmony_ci sources = [ 222545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command.cpp", 223545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command_common.cpp", 224545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_command.cpp", 225545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_status_callback_host_impl.cpp", 226545fdf9bSopenharmony_ci "${bundletool_path}/src/shell_command.cpp", 227545fdf9bSopenharmony_ci "${bundletool_path}/src/status_receiver_impl.cpp", 228545fdf9bSopenharmony_ci "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", 229545fdf9bSopenharmony_ci "bm_command_test.cpp", 230545fdf9bSopenharmony_ci ] 231545fdf9bSopenharmony_ci sources += tools_bm_mock_sources 232545fdf9bSopenharmony_ci 233545fdf9bSopenharmony_ci configs = [ 234545fdf9bSopenharmony_ci "${bundletool_path}:tools_bm_config", 235545fdf9bSopenharmony_ci ":tools_bm_config_mock", 236545fdf9bSopenharmony_ci ] 237545fdf9bSopenharmony_ci 238545fdf9bSopenharmony_ci cflags = [] 239545fdf9bSopenharmony_ci if (target_cpu == "arm") { 240545fdf9bSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 241545fdf9bSopenharmony_ci } 242545fdf9bSopenharmony_ci 243545fdf9bSopenharmony_ci deps = [ 244545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr:libbms", 245545fdf9bSopenharmony_ci "//third_party/googletest:gmock_main", 246545fdf9bSopenharmony_ci "//third_party/googletest:gtest_main", 247545fdf9bSopenharmony_ci ] 248545fdf9bSopenharmony_ci 249545fdf9bSopenharmony_ci external_deps = [ 250545fdf9bSopenharmony_ci "ability_base:want", 251545fdf9bSopenharmony_ci "ability_runtime:app_manager", 252545fdf9bSopenharmony_ci "ability_runtime:quickfix_manager", 253545fdf9bSopenharmony_ci "access_token:libaccesstoken_sdk", 254545fdf9bSopenharmony_ci "appverify:libhapverify", 255545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_base", 256545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_core", 257545fdf9bSopenharmony_ci "bundle_framework:bundle_napi_common", 258545fdf9bSopenharmony_ci "bundle_framework:libappexecfwk_common", 259545fdf9bSopenharmony_ci "c_utils:utils", 260545fdf9bSopenharmony_ci "common_event_service:cesfwk_innerkits", 261545fdf9bSopenharmony_ci "eventhandler:libeventhandler", 262545fdf9bSopenharmony_ci "hilog:libhilog", 263545fdf9bSopenharmony_ci "init:libbegetutil", 264545fdf9bSopenharmony_ci "ipc:ipc_core", 265545fdf9bSopenharmony_ci "kv_store:distributeddata_inner", 266545fdf9bSopenharmony_ci "os_account:os_account_innerkits", 267545fdf9bSopenharmony_ci "relational_store:native_rdb", 268545fdf9bSopenharmony_ci "samgr:samgr_proxy", 269545fdf9bSopenharmony_ci ] 270545fdf9bSopenharmony_ci 271545fdf9bSopenharmony_ci external_deps += bm_install_external_deps 272545fdf9bSopenharmony_ci defines = [] 273545fdf9bSopenharmony_ci if (account_enable_bm) { 274545fdf9bSopenharmony_ci external_deps += [ "os_account:os_account_innerkits" ] 275545fdf9bSopenharmony_ci defines += [ "ACCOUNT_ENABLE" ] 276545fdf9bSopenharmony_ci } 277545fdf9bSopenharmony_ci} 278545fdf9bSopenharmony_ci 279545fdf9bSopenharmony_ciohos_unittest("bm_command_uninstall_test") { 280545fdf9bSopenharmony_ci module_out_path = module_output_path 281545fdf9bSopenharmony_ci 282545fdf9bSopenharmony_ci include_dirs = [] 283545fdf9bSopenharmony_ci 284545fdf9bSopenharmony_ci sources = [ 285545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command.cpp", 286545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command_common.cpp", 287545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_command.cpp", 288545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_status_callback_host_impl.cpp", 289545fdf9bSopenharmony_ci "${bundletool_path}/src/shell_command.cpp", 290545fdf9bSopenharmony_ci "${bundletool_path}/src/status_receiver_impl.cpp", 291545fdf9bSopenharmony_ci "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", 292545fdf9bSopenharmony_ci "bm_command_uninstall_test.cpp", 293545fdf9bSopenharmony_ci ] 294545fdf9bSopenharmony_ci sources += tools_bm_mock_sources 295545fdf9bSopenharmony_ci 296545fdf9bSopenharmony_ci configs = [ 297545fdf9bSopenharmony_ci "${bundletool_path}:tools_bm_config", 298545fdf9bSopenharmony_ci ":tools_bm_config_mock", 299545fdf9bSopenharmony_ci ] 300545fdf9bSopenharmony_ci 301545fdf9bSopenharmony_ci cflags = [] 302545fdf9bSopenharmony_ci if (target_cpu == "arm") { 303545fdf9bSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 304545fdf9bSopenharmony_ci } 305545fdf9bSopenharmony_ci 306545fdf9bSopenharmony_ci deps = [ 307545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr:libbms", 308545fdf9bSopenharmony_ci "//third_party/googletest:gmock_main", 309545fdf9bSopenharmony_ci "//third_party/googletest:gtest_main", 310545fdf9bSopenharmony_ci ] 311545fdf9bSopenharmony_ci 312545fdf9bSopenharmony_ci external_deps = [ 313545fdf9bSopenharmony_ci "ability_base:want", 314545fdf9bSopenharmony_ci "ability_runtime:app_manager", 315545fdf9bSopenharmony_ci "ability_runtime:quickfix_manager", 316545fdf9bSopenharmony_ci "access_token:libaccesstoken_sdk", 317545fdf9bSopenharmony_ci "appverify:libhapverify", 318545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_base", 319545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_core", 320545fdf9bSopenharmony_ci "bundle_framework:bundle_napi_common", 321545fdf9bSopenharmony_ci "bundle_framework:libappexecfwk_common", 322545fdf9bSopenharmony_ci "c_utils:utils", 323545fdf9bSopenharmony_ci "common_event_service:cesfwk_innerkits", 324545fdf9bSopenharmony_ci "eventhandler:libeventhandler", 325545fdf9bSopenharmony_ci "hilog:libhilog", 326545fdf9bSopenharmony_ci "init:libbegetutil", 327545fdf9bSopenharmony_ci "ipc:ipc_core", 328545fdf9bSopenharmony_ci "kv_store:distributeddata_inner", 329545fdf9bSopenharmony_ci "os_account:os_account_innerkits", 330545fdf9bSopenharmony_ci "relational_store:native_rdb", 331545fdf9bSopenharmony_ci "samgr:samgr_proxy", 332545fdf9bSopenharmony_ci ] 333545fdf9bSopenharmony_ci 334545fdf9bSopenharmony_ci external_deps += bm_install_external_deps 335545fdf9bSopenharmony_ci} 336545fdf9bSopenharmony_ci 337545fdf9bSopenharmony_ciohos_unittest("bm_command_quickfix_test") { 338545fdf9bSopenharmony_ci module_out_path = module_output_path 339545fdf9bSopenharmony_ci 340545fdf9bSopenharmony_ci include_dirs = [] 341545fdf9bSopenharmony_ci 342545fdf9bSopenharmony_ci sources = [ 343545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command.cpp", 344545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command_common.cpp", 345545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_command.cpp", 346545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_status_callback_host_impl.cpp", 347545fdf9bSopenharmony_ci "${bundletool_path}/src/shell_command.cpp", 348545fdf9bSopenharmony_ci "${bundletool_path}/src/status_receiver_impl.cpp", 349545fdf9bSopenharmony_ci "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", 350545fdf9bSopenharmony_ci "bm_command_quickfix_test.cpp", 351545fdf9bSopenharmony_ci ] 352545fdf9bSopenharmony_ci sources += tools_bm_mock_sources 353545fdf9bSopenharmony_ci 354545fdf9bSopenharmony_ci configs = [ 355545fdf9bSopenharmony_ci "${bundletool_path}:tools_bm_config", 356545fdf9bSopenharmony_ci ":tools_bm_config_mock", 357545fdf9bSopenharmony_ci ] 358545fdf9bSopenharmony_ci 359545fdf9bSopenharmony_ci cflags = [] 360545fdf9bSopenharmony_ci if (target_cpu == "arm") { 361545fdf9bSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 362545fdf9bSopenharmony_ci } 363545fdf9bSopenharmony_ci 364545fdf9bSopenharmony_ci deps = [ 365545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr:libbms", 366545fdf9bSopenharmony_ci "//third_party/googletest:gmock_main", 367545fdf9bSopenharmony_ci "//third_party/googletest:gtest_main", 368545fdf9bSopenharmony_ci ] 369545fdf9bSopenharmony_ci 370545fdf9bSopenharmony_ci external_deps = [ 371545fdf9bSopenharmony_ci "ability_base:want", 372545fdf9bSopenharmony_ci "ability_runtime:app_manager", 373545fdf9bSopenharmony_ci "ability_runtime:quickfix_manager", 374545fdf9bSopenharmony_ci "access_token:libaccesstoken_sdk", 375545fdf9bSopenharmony_ci "appverify:libhapverify", 376545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_base", 377545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_core", 378545fdf9bSopenharmony_ci "bundle_framework:bundle_napi_common", 379545fdf9bSopenharmony_ci "bundle_framework:libappexecfwk_common", 380545fdf9bSopenharmony_ci "c_utils:utils", 381545fdf9bSopenharmony_ci "common_event_service:cesfwk_innerkits", 382545fdf9bSopenharmony_ci "eventhandler:libeventhandler", 383545fdf9bSopenharmony_ci "hilog:libhilog", 384545fdf9bSopenharmony_ci "init:libbegetutil", 385545fdf9bSopenharmony_ci "ipc:ipc_core", 386545fdf9bSopenharmony_ci "kv_store:distributeddata_inner", 387545fdf9bSopenharmony_ci "os_account:os_account_innerkits", 388545fdf9bSopenharmony_ci "relational_store:native_rdb", 389545fdf9bSopenharmony_ci "samgr:samgr_proxy", 390545fdf9bSopenharmony_ci ] 391545fdf9bSopenharmony_ci 392545fdf9bSopenharmony_ci external_deps += bm_install_external_deps 393545fdf9bSopenharmony_ci} 394545fdf9bSopenharmony_ci 395545fdf9bSopenharmony_ciohos_unittest("bm_command_overlay_test") { 396545fdf9bSopenharmony_ci module_out_path = module_output_path 397545fdf9bSopenharmony_ci 398545fdf9bSopenharmony_ci include_dirs = [] 399545fdf9bSopenharmony_ci 400545fdf9bSopenharmony_ci sources = [ 401545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command.cpp", 402545fdf9bSopenharmony_ci "${bundletool_path}/src/bundle_command_common.cpp", 403545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_command.cpp", 404545fdf9bSopenharmony_ci "${bundletool_path}/src/quick_fix_status_callback_host_impl.cpp", 405545fdf9bSopenharmony_ci "${bundletool_path}/src/shell_command.cpp", 406545fdf9bSopenharmony_ci "${bundletool_path}/src/status_receiver_impl.cpp", 407545fdf9bSopenharmony_ci "${kits_path}/js/bundlemgr/bundle_death_recipient.cpp", 408545fdf9bSopenharmony_ci "bm_command_overlay_test.cpp", 409545fdf9bSopenharmony_ci ] 410545fdf9bSopenharmony_ci sources += tools_bm_mock_sources 411545fdf9bSopenharmony_ci 412545fdf9bSopenharmony_ci configs = [ 413545fdf9bSopenharmony_ci "${bundletool_path}:tools_bm_config", 414545fdf9bSopenharmony_ci ":tools_bm_config_mock", 415545fdf9bSopenharmony_ci ] 416545fdf9bSopenharmony_ci 417545fdf9bSopenharmony_ci cflags = [] 418545fdf9bSopenharmony_ci if (target_cpu == "arm") { 419545fdf9bSopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 420545fdf9bSopenharmony_ci } 421545fdf9bSopenharmony_ci 422545fdf9bSopenharmony_ci deps = [ 423545fdf9bSopenharmony_ci "${bundle_framework_path}/services/bundlemgr:libbms", 424545fdf9bSopenharmony_ci "//third_party/googletest:gmock_main", 425545fdf9bSopenharmony_ci "//third_party/googletest:gtest_main", 426545fdf9bSopenharmony_ci ] 427545fdf9bSopenharmony_ci 428545fdf9bSopenharmony_ci external_deps = [ 429545fdf9bSopenharmony_ci "ability_base:want", 430545fdf9bSopenharmony_ci "ability_runtime:app_manager", 431545fdf9bSopenharmony_ci "ability_runtime:quickfix_manager", 432545fdf9bSopenharmony_ci "access_token:libaccesstoken_sdk", 433545fdf9bSopenharmony_ci "appverify:libhapverify", 434545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_base", 435545fdf9bSopenharmony_ci "bundle_framework:appexecfwk_core", 436545fdf9bSopenharmony_ci "bundle_framework:bundle_napi_common", 437545fdf9bSopenharmony_ci "bundle_framework:libappexecfwk_common", 438545fdf9bSopenharmony_ci "c_utils:utils", 439545fdf9bSopenharmony_ci "common_event_service:cesfwk_innerkits", 440545fdf9bSopenharmony_ci "eventhandler:libeventhandler", 441545fdf9bSopenharmony_ci "hilog:libhilog", 442545fdf9bSopenharmony_ci "init:libbegetutil", 443545fdf9bSopenharmony_ci "ipc:ipc_core", 444545fdf9bSopenharmony_ci "kv_store:distributeddata_inner", 445545fdf9bSopenharmony_ci "os_account:os_account_innerkits", 446545fdf9bSopenharmony_ci "relational_store:native_rdb", 447545fdf9bSopenharmony_ci "samgr:samgr_proxy", 448545fdf9bSopenharmony_ci ] 449545fdf9bSopenharmony_ci 450545fdf9bSopenharmony_ci external_deps += bm_install_external_deps 451545fdf9bSopenharmony_ci 452545fdf9bSopenharmony_ci defines = [] 453545fdf9bSopenharmony_ci if (overlay_install_bm) { 454545fdf9bSopenharmony_ci defines += [ "BUNDLE_FRAMEWORK_OVERLAY_INSTALLATION" ] 455545fdf9bSopenharmony_ci } 456545fdf9bSopenharmony_ci} 457545fdf9bSopenharmony_ci 458545fdf9bSopenharmony_cigroup("unittest") { 459545fdf9bSopenharmony_ci testonly = true 460545fdf9bSopenharmony_ci 461545fdf9bSopenharmony_ci deps = [ 462545fdf9bSopenharmony_ci ":bm_command_dump_dependencies_test", 463545fdf9bSopenharmony_ci ":bm_command_dump_test", 464545fdf9bSopenharmony_ci ":bm_command_install_test", 465545fdf9bSopenharmony_ci ":bm_command_overlay_test", 466545fdf9bSopenharmony_ci ":bm_command_quickfix_test", 467545fdf9bSopenharmony_ci ":bm_command_test", 468545fdf9bSopenharmony_ci ":bm_command_uninstall_test", 469545fdf9bSopenharmony_ci ] 470545fdf9bSopenharmony_ci} 471