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 19ohos_systemtest("bm_command_install_system_test") { 20 module_out_path = module_output_path 21 22 sources = [ 23 "bm_command_install_system_test.cpp", 24 "tool_system_test.cpp", 25 ] 26 27 configs = [ 28 "${bundletool_path}:tools_bm_config", 29 "${bundletool_test_path}/unittest/bm:tools_bm_config_mock", 30 ] 31 32 cflags = [] 33 if (target_cpu == "arm") { 34 cflags += [ "-DBINDER_IPC_32BIT" ] 35 } 36 37 deps = [ 38 "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall", 39 "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall", 40 "${bundle_framework_path}/test/sceneProject/tools/ohos_test:copy_ohos_test", 41 "//third_party/googletest:gtest_main", 42 ] 43 44 external_deps = [ 45 "ability_base:base", 46 "ability_base:configuration", 47 "ability_base:want", 48 "hilog:libhilog", 49 "ipc:ipc_core", 50 "os_account:os_account_innerkits", 51 ] 52} 53 54ohos_systemtest("bm_command_uninstall_system_test") { 55 module_out_path = module_output_path 56 57 sources = [ 58 "bm_command_uninstall_system_test.cpp", 59 "tool_system_test.cpp", 60 ] 61 62 configs = [ 63 "${bundletool_path}:tools_bm_config", 64 "${bundletool_test_path}/unittest/bm:tools_bm_config_mock", 65 ] 66 67 cflags = [] 68 if (target_cpu == "arm") { 69 cflags += [ "-DBINDER_IPC_32BIT" ] 70 } 71 72 deps = [ 73 "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall", 74 "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall", 75 "${bundle_framework_path}/test/sceneProject/tools/ohos_test:copy_ohos_test", 76 "//third_party/googletest:gtest_main", 77 ] 78 79 external_deps = [ 80 "ability_base:base", 81 "ability_base:configuration", 82 "ability_base:want", 83 "hilog:libhilog", 84 "ipc:ipc_core", 85 "os_account:os_account_innerkits", 86 ] 87} 88 89ohos_systemtest("bm_command_dump_system_test") { 90 module_out_path = module_output_path 91 92 sources = [ 93 "bm_command_dump_system_test.cpp", 94 "tool_system_test.cpp", 95 ] 96 97 configs = [ 98 "${bundletool_path}:tools_bm_config", 99 "${bundletool_test_path}/unittest/bm:tools_bm_config_mock", 100 ] 101 102 cflags = [] 103 if (target_cpu == "arm") { 104 cflags += [ "-DBINDER_IPC_32BIT" ] 105 } 106 107 deps = [ 108 "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForInstall:pageAbilityBundleForInstall", 109 "${bundle_framework_path}/test/sceneProject/tools/bm/pageAbilityBundleForUninstall:pageAbilityBundleForUninstall", 110 "${bundle_framework_path}/test/sceneProject/tools/ohos_test:copy_ohos_test", 111 "//third_party/googletest:gtest_main", 112 ] 113 114 external_deps = [ 115 "ability_base:base", 116 "ability_base:configuration", 117 "ability_base:want", 118 "hilog:libhilog", 119 "ipc:ipc_core", 120 "os_account:os_account_innerkits", 121 ] 122} 123 124group("systemtest") { 125 testonly = true 126 127 deps = [ 128 ":bm_command_dump_system_test", 129 ":bm_command_install_system_test", 130 ":bm_command_uninstall_system_test", 131 ] 132} 133