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