1# Copyright (c) 2021 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("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17module_output_path = "ability_tools/tools" 18 19config("tools_aa_test_config") { 20 include_dirs = [] 21} 22 23ohos_systemtest("aa_command_start_system_test") { 24 module_out_path = module_output_path 25 26 include_dirs = [ "//third_party/jsoncpp/include" ] 27 28 sources = [ 29 "aa_command_start_system_test.cpp", 30 "tool_system_test.cpp", 31 ] 32 33 configs = [ ":tools_aa_test_config" ] 34 35 cflags = [] 36 if (target_cpu == "arm") { 37 cflags += [ "-DBINDER_IPC_32BIT" ] 38 } 39 40 deps = [ 41 "${ability_runtime_path}/tools/aa:tools_aa_source_set", 42 "${ability_runtime_path}/tools/test/resource/aa/pageAbilityBundleForStart:pageAbilityBundleForStart", 43 "${ability_runtime_path}/tools/test/resource/aa/serviceAbilityBundleForStart:serviceAbilityBundleForStart", 44 "${ability_runtime_path}/tools/test/resource/ohos_test:copy_ohos_test", 45 "//third_party/googletest:gtest_main", 46 "//third_party/jsoncpp:jsoncpp", 47 ] 48 49 external_deps = [ 50 "ability_base:base", 51 "ability_base:configuration", 52 "bundle_framework:appexecfwk_base", 53 "hilog:libhilog", 54 "ipc:ipc_core", 55 ] 56} 57 58ohos_systemtest("aa_command_stop_service_system_test") { 59 module_out_path = module_output_path 60 61 sources = [ 62 "aa_command_stop_service_system_test.cpp", 63 "tool_system_test.cpp", 64 ] 65 66 configs = [ ":tools_aa_test_config" ] 67 68 cflags = [] 69 if (target_cpu == "arm") { 70 cflags += [ "-DBINDER_IPC_32BIT" ] 71 } 72 73 deps = [ 74 "${ability_runtime_path}/tools/aa:tools_aa_source_set", 75 "${ability_runtime_path}/tools/test/resource/aa/serviceAbilityBundleForStop:serviceAbilityBundleForStop", 76 "${ability_runtime_path}/tools/test/resource/ohos_test:copy_ohos_test", 77 "//third_party/googletest:gtest_main", 78 "//third_party/jsoncpp:jsoncpp", 79 ] 80 81 external_deps = [ 82 "ability_base:base", 83 "ability_base:configuration", 84 "bundle_framework:appexecfwk_base", 85 "hilog:libhilog", 86 "ipc:ipc_core", 87 ] 88} 89 90ohos_systemtest("aa_command_dump_system_test") { 91 module_out_path = module_output_path 92 93 include_dirs = [ "//third_party/jsoncpp/include" ] 94 95 sources = [ 96 "aa_command_dump_system_test.cpp", 97 "tool_system_test.cpp", 98 ] 99 100 configs = [ ":tools_aa_test_config" ] 101 102 cflags = [] 103 if (target_cpu == "arm") { 104 cflags += [ "-DBINDER_IPC_32BIT" ] 105 } 106 107 deps = [ 108 "${ability_runtime_path}/tools/aa:tools_aa_source_set", 109 "${ability_runtime_path}/tools/test/resource/aa/dataAbilityBundleForDump:dataAbilityBundleForDump", 110 "${ability_runtime_path}/tools/test/resource/aa/pageAbilityBundleForDump:pageAbilityBundleForDump", 111 "${ability_runtime_path}/tools/test/resource/aa/serviceAbilityBundleForStart:serviceAbilityBundleForStart", 112 "${ability_runtime_path}/tools/test/resource/ohos_test:copy_ohos_test", 113 "//third_party/googletest:gtest_main", 114 "//third_party/jsoncpp:jsoncpp", 115 ] 116 117 external_deps = [ 118 "ability_base:base", 119 "ability_base:configuration", 120 "bundle_framework:appexecfwk_base", 121 "hilog:libhilog", 122 "ipc:ipc_core", 123 ] 124} 125 126group("systemtest") { 127 testonly = true 128 129 deps = [ 130 ":aa_command_dump_system_test", 131 ":aa_command_start_system_test", 132 ":aa_command_stop_service_system_test", 133 ] 134} 135