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