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 ], 96 test_config_template: ":atest_integration_test_config_template", 97 test_options: { 98 unit_test: false, 99 }, 100 defaults: [ 101 "atest_integration_test_defaults", 102 ], 103} 104 105python_test_host { 106 name: "adevice_integration_tests", 107 srcs: [ 108 "adevice_integration_tests.py", 109 "adevice_command_success_tests.py", 110 ], 111 test_config_template: ":atest_integration_test_config_template", 112 test_options: { 113 unit_test: false, 114 }, 115 defaults: [ 116 "atest_integration_test_defaults", 117 ], 118} 119 120python_test_host { 121 name: "atest_command_success_tests", 122 srcs: [ 123 "atest_command_success_tests.py", 124 ], 125 test_config_template: ":atest_integration_test_config_template", 126 test_options: { 127 unit_test: false, 128 }, 129 defaults: [ 130 "atest_integration_test_defaults", 131 ], 132} 133 134python_test_host { 135 name: "adevice_command_success_tests", 136 srcs: [ 137 "adevice_command_success_tests.py", 138 ], 139 test_config_template: "split_build_test_script_config.xml", 140 test_options: { 141 unit_test: false, 142 }, 143 defaults: [ 144 "atest_integration_test_defaults", 145 ], 146} 147 148python_test_host { 149 name: "atest_command_verification_tests", 150 srcs: [ 151 "atest_command_verification_tests.py", 152 ], 153 test_config_template: ":atest_integration_test_config_template", 154 test_options: { 155 unit_test: false, 156 }, 157 defaults: [ 158 "atest_integration_test_defaults", 159 ], 160} 161 162python_test_host { 163 name: "atest_test_archetype_integration_tests", 164 srcs: [ 165 "atest_test_archetype_integration_tests.py", 166 ], 167 test_config_template: ":atest_integration_test_config_template", 168 test_options: { 169 unit_test: false, 170 }, 171 defaults: [ 172 "atest_integration_test_defaults", 173 ], 174} 175