1// Copyright (C) 2021 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// The below module creates a standalone zip that end-to-end tests can depend 16// on for running the suite. This is a workaround since we can't use csuite.zip 17// which is defined in an external Makefile that Soong can't depend on. 18// 19// Besides listing jars we know the launcher script depends on which is 20// brittle, this is a hack for several reasons. First, we're listing our 21// dependencies in the tools attribute when we should be using the 'srcs' 22// attribute. Second, we're accessing jars using a path relative to a known 23// artifact location instead of using the Soong 'location' feature. 24 25package { 26 default_applicable_licenses: ["Android-Apache-2.0"], 27} 28 29python_test_host { 30 name: "bazel_mode_test", 31 srcs: [ 32 "bazel_mode_test.py", 33 ], 34 test_config_template: "bazel_mode_test.xml", 35 test_suites: [ 36 "general-tests", 37 ], 38 test_options: { 39 unit_test: false, 40 }, 41} 42 43python_test_host { 44 name: "result_compare_test", 45 srcs: [ 46 "result_compare_test.py", 47 ], 48 test_config_template: "bazel_mode_test.xml", 49 test_suites: [ 50 "general-tests", 51 ], 52 test_options: { 53 unit_test: false, 54 }, 55} 56 57python_library_host { 58 name: "asuite_integration_test_lib", 59 srcs: [ 60 "snapshot.py", 61 "split_build_test_script.py", 62 ], 63} 64 65python_defaults { 66 name: "atest_integration_test_defaults", 67 srcs: [ 68 "atest_integration_test.py", 69 ], 70 libs: [ 71 "asuite_integration_test_lib", 72 ], 73 version: { 74 py3: { 75 embedded_launcher: true, 76 }, 77 }, 78 test_suites: [ 79 "general-tests", 80 ], 81} 82 83filegroup { 84 name: "atest_integration_test_config_template", 85 srcs: ["split_build_test_script_config.xml"], 86} 87 88python_test_host { 89 name: "atest_integration_tests", 90 srcs: [ 91 "atest_integration_tests.py", 92 "atest_command_success_tests.py", 93 "atest_command_verification_tests.py", 94 "atest_test_archetype_integration_tests.py", 95 "atest_dry_run_diff_tests.py", 96 ], 97 test_config_template: ":atest_integration_test_config_template", 98 test_options: { 99 unit_test: false, 100 }, 101 defaults: [ 102 "atest_integration_test_defaults", 103 ], 104} 105 106python_test_host { 107 name: "adevice_integration_tests", 108 srcs: [ 109 "adevice_integration_tests.py", 110 "adevice_command_success_tests.py", 111 ], 112 test_config_template: ":atest_integration_test_config_template", 113 test_options: { 114 unit_test: false, 115 }, 116 defaults: [ 117 "atest_integration_test_defaults", 118 ], 119} 120 121python_test_host { 122 name: "atest_command_success_tests", 123 srcs: [ 124 "atest_command_success_tests.py", 125 ], 126 test_config_template: ":atest_integration_test_config_template", 127 test_options: { 128 unit_test: false, 129 }, 130 defaults: [ 131 "atest_integration_test_defaults", 132 ], 133} 134 135python_test_host { 136 name: "adevice_command_success_tests", 137 srcs: [ 138 "adevice_command_success_tests.py", 139 ], 140 test_config_template: "split_build_test_script_config.xml", 141 test_options: { 142 unit_test: false, 143 }, 144 defaults: [ 145 "atest_integration_test_defaults", 146 ], 147} 148 149python_test_host { 150 name: "atest_command_verification_tests", 151 srcs: [ 152 "atest_command_verification_tests.py", 153 ], 154 test_config_template: ":atest_integration_test_config_template", 155 test_options: { 156 unit_test: false, 157 }, 158 defaults: [ 159 "atest_integration_test_defaults", 160 ], 161} 162 163python_test_host { 164 name: "atest_test_archetype_integration_tests", 165 srcs: [ 166 "atest_test_archetype_integration_tests.py", 167 ], 168 test_config_template: ":atest_integration_test_config_template", 169 test_options: { 170 unit_test: false, 171 }, 172 defaults: [ 173 "atest_integration_test_defaults", 174 ], 175} 176 177python_test_host { 178 name: "atest_dry_run_diff_tests", 179 srcs: [ 180 "atest_dry_run_diff_tests.py", 181 "atest_command_verification_tests.py", 182 ], 183 test_config_template: ":atest_integration_test_config_template", 184 test_options: { 185 unit_test: false, 186 }, 187 defaults: [ 188 "atest_integration_test_defaults", 189 ], 190} 191