1# Copyright (c) 2021-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("../../../bundletool.gni") 16 17module_output_path = "bundle_tool/tools" 18 19config("tools_bm_config_systemtest") { 20 include_dirs = [ "${bundletool_test_path}/mock/" ] 21} 22 23ohos_systemtest("bm_command_install_system_test") { 24 module_out_path = module_output_path 25 26 sources = [ 27 "bm_command_install_system_test.cpp", 28 "tool_system_test.cpp", 29 ] 30 31 deps = [ 32 "${bundletool_test_path}/systemtest/bm/ohos_test:copy_ohos_test", 33 "${bundletool_test_path}/systemtest/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall", 34 "${bundletool_test_path}/systemtest/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall", 35 ] 36 37 configs = [ 38 "${bundletool_path}:tools_bm_config", 39 ":tools_bm_config_systemtest", 40 ] 41 42 cflags = [] 43 if (target_cpu == "arm") { 44 cflags += [ "-DBINDER_IPC_32BIT" ] 45 } 46 47 external_deps = [ 48 "ability_base:base", 49 "ability_base:configuration", 50 "ability_base:want", 51 "bundle_framework:appexecfwk_base", 52 "bundle_framework:appexecfwk_core", 53 "bundle_framework:bundle_napi_common", 54 "googletest:gtest_main", 55 "hilog:libhilog", 56 "ipc:ipc_core", 57 "os_account:os_account_innerkits", 58 ] 59 60 external_deps += bm_install_external_deps 61} 62 63ohos_systemtest("bm_command_uninstall_system_test") { 64 module_out_path = module_output_path 65 66 sources = [ 67 "bm_command_uninstall_system_test.cpp", 68 "tool_system_test.cpp", 69 ] 70 71 configs = [ 72 "${bundletool_path}:tools_bm_config", 73 ":tools_bm_config_systemtest", 74 ] 75 76 cflags = [] 77 if (target_cpu == "arm") { 78 cflags += [ "-DBINDER_IPC_32BIT" ] 79 } 80 81 deps = [ 82 "${bundletool_test_path}/systemtest/bm/ohos_test:copy_ohos_test", 83 "${bundletool_test_path}/systemtest/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall", 84 "${bundletool_test_path}/systemtest/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall", 85 ] 86 87 external_deps = [ 88 "ability_base:base", 89 "ability_base:configuration", 90 "ability_base:want", 91 "bundle_framework:appexecfwk_base", 92 "bundle_framework:appexecfwk_core", 93 "bundle_framework:bundle_napi_common", 94 "googletest:gtest_main", 95 "hilog:libhilog", 96 "ipc:ipc_core", 97 "os_account:os_account_innerkits", 98 ] 99 100 external_deps += bm_install_external_deps 101} 102 103ohos_systemtest("bm_command_dump_system_test") { 104 module_out_path = module_output_path 105 106 sources = [ 107 "bm_command_dump_system_test.cpp", 108 "tool_system_test.cpp", 109 ] 110 111 configs = [ 112 "${bundletool_path}:tools_bm_config", 113 ":tools_bm_config_systemtest", 114 ] 115 116 cflags = [] 117 if (target_cpu == "arm") { 118 cflags += [ "-DBINDER_IPC_32BIT" ] 119 } 120 121 deps = [ 122 "${bundletool_test_path}/systemtest/bm/ohos_test:copy_ohos_test", 123 "${bundletool_test_path}/systemtest/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall", 124 "${bundletool_test_path}/systemtest/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall", 125 ] 126 127 external_deps = [ 128 "ability_base:base", 129 "ability_base:configuration", 130 "ability_base:want", 131 "bundle_framework:appexecfwk_base", 132 "bundle_framework:appexecfwk_core", 133 "bundle_framework:bundle_napi_common", 134 "googletest:gtest_main", 135 "hilog:libhilog", 136 "ipc:ipc_core", 137 "os_account:os_account_innerkits", 138 ] 139 140 external_deps += bm_install_external_deps 141} 142 143group("systemtest") { 144 testonly = true 145 146 deps = [ 147 ":bm_command_dump_system_test", 148 ":bm_command_install_system_test", 149 ":bm_command_uninstall_system_test", 150 ] 151} 152