1// Copyright (C) 2018 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
15java_defaults {
16    name: "apex_e2e_test_defaults",
17    libs: [
18        "tradefed",
19        "truth-prebuilt",
20    ],
21    static_libs: [
22        "apex_e2e_base_test",
23    ],
24}
25
26java_test_host {
27    name: "adbd_e2e_tests",
28    srcs:  ["src/**/AdbdHostTest.java"],
29    defaults: ["apex_e2e_test_defaults"],
30    data: [
31        ":test_com.android.adbd",
32    ],
33    test_config: "adbd-e2e-tests.xml",
34    test_suites: ["device-tests"],
35}
36
37java_test_host {
38    name: "timezone_data_e2e_tests",
39    srcs:  ["src/**/TimezoneDataHostTest.java"],
40    defaults: ["apex_e2e_test_defaults"],
41    static_libs: [
42        "platformprotos",
43    ],
44    data: [
45        ":test1_com.android.tzdata",
46    ],
47    test_config: "timezone-data-e2e-tests.xml",
48    test_suites: ["device-tests"],
49}
50
51java_test_host {
52    name: "statsd_e2e_tests",
53    srcs:  ["src/**/StatsdHostTest.java"],
54    defaults: ["apex_e2e_test_defaults"],
55    data: [
56        ":test_com.android.os.statsd",
57    ],
58    test_config: "statsd-e2e-tests.xml",
59    test_suites: ["device-tests"],
60}
61
62java_test_host {
63    name: "media_e2e_tests",
64    srcs:  ["src/**/MediaHostTest.java"],
65    defaults: ["apex_e2e_test_defaults"],
66    data: [
67        ":test_com.android.media",
68    ],
69    test_config: "media-e2e-tests.xml",
70    test_suites: ["device-tests"],
71}
72
73java_test_host {
74    name: "media_swcodec_e2e_tests",
75    srcs:  ["src/**/MediaSwCodecHostTest.java"],
76    defaults: ["apex_e2e_test_defaults"],
77    data: [
78        ":test_com.android.media.swcodec",
79    ],
80    test_config: "media-swcodec-e2e-tests.xml",
81    test_suites: ["device-tests"],
82}
83
84java_test_host {
85    name: "mediaprovider_e2e_tests",
86    srcs:  ["src/**/MediaProviderHostTest.java"],
87    defaults: ["apex_e2e_test_defaults"],
88    data: [
89        ":test_com.android.mediaprovider",
90    ],
91    test_config: "mediaprovider-e2e-tests.xml",
92    test_suites: ["device-tests"],
93}
94
95java_test_host {
96    name: "conscrypt_e2e_tests",
97    srcs:  ["src/**/ConscryptHostTest.java"],
98    defaults: ["apex_e2e_test_defaults"],
99    data: [
100        ":test_com.android.conscrypt",
101    ],
102    test_config: "conscrypt-e2e-tests.xml",
103    test_suites: ["device-tests"],
104}
105
106java_test_host {
107    name: "neuralnetworks_e2e_tests",
108    srcs:  ["src/**/NeuralNetworksHostTest.java"],
109    defaults: ["apex_e2e_test_defaults"],
110    data: [
111        ":test_com.android.neuralnetworks",
112    ],
113    test_config: "neuralnetworks-e2e-tests.xml",
114    test_suites: ["device-tests"],
115}
116
117
118java_test_host {
119    name: "cellbroadcast_e2e_tests",
120    srcs:  ["src/**/CellbroadcastHostTest.java"],
121    defaults: ["apex_e2e_test_defaults"],
122    data: [
123        ":test_com.android.cellbroadcast",
124    ],
125    test_config: "cellbroadcast-e2e-tests.xml",
126    test_suites: ["device-tests"],
127}
128
129java_test_host {
130    name: "ipsec_e2e_tests",
131    srcs:  ["src/**/IpSecHostTest.java"],
132    defaults: ["apex_e2e_test_defaults"],
133    data: [
134        ":test_com.android.ipsec",
135    ],
136    test_config: "ipsec-e2e-tests.xml",
137    test_suites: ["device-tests"],
138}
139
140java_test_host {
141    name: "permission_e2e_tests",
142    srcs:  ["src/**/PermissionHostTest.java"],
143    defaults: ["apex_e2e_test_defaults"],
144    data: [
145        ":test_com.android.permission",
146    ],
147    test_config: "permission-e2e-tests.xml",
148    test_suites: ["device-tests"],
149}
150
151java_test_host {
152    name: "wifi_e2e_tests",
153    srcs:  ["src/**/WifiHostTest.java"],
154    defaults: ["apex_e2e_test_defaults"],
155    data: [
156        ":test_com.android.wifi",
157    ],
158    test_config: "wifi-e2e-tests.xml",
159    test_suites: ["device-tests"],
160}
161
162java_test_host {
163    name: "extservices_e2e_tests",
164    srcs:  ["src/**/ExtServicesHostTest.java"],
165    defaults: ["apex_e2e_test_defaults"],
166    data: [
167        ":test_com.android.extservices",
168    ],
169    test_config: "extservices-e2e-tests.xml",
170    test_suites: ["device-tests"],
171}
172
173java_test_host {
174    name: "apex_targetprep_tests",
175    libs: ["tradefed"],
176    srcs:  ["src/**/ApexTargetPrepTest.java"],
177    data: [":StagedInstallTestApexV2"],
178    test_config: "apex-targetprep-tests.xml",
179    test_suites: ["general-tests"],
180}
181
182java_library_host {
183    name: "apex_e2e_base_test",
184    srcs: ["src/**/ApexE2EBaseHostTest.java"],
185    static_libs: [
186        "module_test_util",
187    ],
188    libs: [
189        "tradefed",
190    ],
191}
192
193java_library_host {
194    name: "module_test_util",
195    srcs: ["util/**/ModuleTestUtils.java"],
196    libs: ["tradefed", "truth-prebuilt"],
197}
198
199apex {
200    name: "apex.test",
201    manifest: "testdata/apex_manifest.json",
202    prebuilts: ["sample_prebuilt_file"],
203    key: "apex.test.key",
204    certificate: ":apex.test.certificate",
205    installable: false,
206}
207
208apex_key {
209    name: "apex.test.key",
210    public_key: "testdata/com.android.apex.test.avbpubkey",
211    private_key: "testdata/com.android.apex.test.pem",
212    installable: false,
213}
214
215android_app_certificate {
216    name: "apex.test.certificate",
217    // will use testcert.pk8 and testcert.x509.pem
218    certificate: "testdata/testcert",
219}
220
221prebuilt_etc {
222    name: "apex.test.ld.config.txt",
223    src: "testdata/ld.config.txt",
224    filename: "ld.config.txt",
225    installable: false,
226}
227
228prebuilt_etc {
229    name: "sample_prebuilt_file",
230    src: "testdata/sample_prebuilt_file",
231}
232
233prebuilt_etc {
234    name: "apex.test.init.rc",
235    src: "testdata/init.rc",
236    filename: "init.rc",
237    installable: false,
238}
239
240cc_binary {
241    name: "sample_prefer32_binary",
242    srcs: ["sample_prefer32_binary.cc"],
243    target: {
244        android: {
245            compile_multilib: "prefer32",
246        },
247    },
248}
249
250java_test_host {
251    name: "apex_rollback_tests",
252    srcs:  ["src/**/ApexRollbackTests.java", "src/**/ApexTestUtils.java"],
253    libs: ["tradefed", "truth-prebuilt"],
254    static_libs: ["module_test_util"],
255    test_config: "apex-rollback-tests.xml",
256    test_suites: ["general-tests"],
257
258    data: [
259        "testdata/trigger_watchdog.rc",
260        "testdata/trigger_watchdog.sh",
261        "testdata/trigger_reboot.sh",
262        ":apex.apexd_test_v2",
263        ":com.android.apex.cts.shim.v2_prebuilt",
264    ],
265}
266
267java_test_host {
268    name: "module_test_utils_tests",
269    srcs:  ["src/**/ModuleTestUtilsTest.java"],
270    libs: ["tradefed", "truth-prebuilt"],
271    static_libs: ["module_test_util"],
272    test_config: "module-test-utils-tests.xml",
273    test_suites: ["general-tests"],
274    data: [":com.android.apex.cts.shim.v2_prebuilt"],
275}
276
277java_test_host {
278    name: "apexd_host_tests",
279    srcs:  ["src/**/ApexdHostTest.java"],
280    libs: ["tradefed"],
281    static_libs: [
282        "module_test_util",
283        "truth-prebuilt",
284        "apex_manifest_proto_java",
285    ],
286    test_config: "apexd-host-tests.xml",
287    test_suites: ["general-tests"],
288    data: [
289        ":apex.apexd_test",
290        ":apex.apexd_test_v2",
291        ":apex.apexd_test_v2_no_pb",
292        ":apex.apexd_test_v3",
293        ":com.android.apex.cts.shim.v2_prebuilt",
294        ":com.android.apex.cts.shim.v2_no_pb",
295    ],
296}
297