• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19java_defaults {
20    name: "apex_e2e_test_defaults",
21    libs: [
22        "tradefed",
23        "truth-prebuilt",
24    ],
25    static_libs: [
26        "apex_e2e_base_test",
27    ],
28}
29
30java_test_host {
31    name: "timezone_data_e2e_tests",
32    srcs:  ["src/**/TimezoneDataHostTest.java"],
33    defaults: ["apex_e2e_test_defaults"],
34    static_libs: [
35        "platformprotos",
36    ],
37    data: [
38        ":test1_com.android.tzdata",
39    ],
40    test_config: "timezone-data-e2e-tests.xml",
41    test_suites: ["device-tests"],
42}
43
44java_test_host {
45    name: "media_e2e_tests",
46    srcs:  ["src/**/MediaHostTest.java"],
47    defaults: ["apex_e2e_test_defaults"],
48    data: [
49        ":test_com.android.media",
50    ],
51    test_config: "media-e2e-tests.xml",
52    test_suites: ["device-tests"],
53}
54
55java_test_host {
56    name: "media_swcodec_e2e_tests",
57    srcs:  ["src/**/MediaSwCodecHostTest.java"],
58    defaults: ["apex_e2e_test_defaults"],
59    data: [
60        ":test_com.android.media.swcodec",
61    ],
62    test_config: "media-swcodec-e2e-tests.xml",
63    test_suites: ["device-tests"],
64}
65
66java_test_host {
67    name: "apex_targetprep_tests",
68    libs: ["tradefed"],
69    srcs:  ["src/**/ApexTargetPrepTest.java"],
70    data: [":StagedInstallTestApexV2"],
71    test_config: "apex-targetprep-tests.xml",
72    test_suites: ["general-tests"],
73}
74
75java_library_host {
76    name: "apex_e2e_base_test",
77    srcs: ["src/**/ApexE2EBaseHostTest.java"],
78    static_libs: [
79        "frameworks-base-hostutils",
80        "cts-install-lib-host",
81    ],
82    libs: [
83        "tradefed",
84    ],
85}
86
87apex {
88    name: "apex.test",
89    manifest: "testdata/apex_manifest.json",
90    androidManifest: "testdata/AndroidManifest.xml",
91    prebuilts: ["sample_prebuilt_file"],
92    key: "apex.test.key",
93    certificate: ":apex.test.certificate",
94    installable: false,
95    updatable: false,
96}
97
98apex_key {
99    name: "apex.test.key",
100    public_key: "testdata/com.android.apex.test.avbpubkey",
101    private_key: "testdata/com.android.apex.test.pem",
102    installable: false,
103}
104
105android_app_certificate {
106    name: "apex.test.certificate",
107    // will use testcert.pk8 and testcert.x509.pem
108    certificate: "testdata/testcert",
109}
110
111prebuilt_etc {
112    name: "apex.test.ld.config.txt",
113    src: "testdata/ld.config.txt",
114    filename: "ld.config.txt",
115    installable: false,
116}
117
118prebuilt_etc {
119    name: "sample_prebuilt_file",
120    src: "testdata/sample_prebuilt_file",
121}
122
123prebuilt_etc {
124    name: "apex.test.init.rc",
125    src: "testdata/init.rc",
126    filename: "init.rc",
127    installable: false,
128}
129
130java_test_host {
131    name: "apex_rollback_tests",
132    srcs:  ["src/**/ApexRollbackTests.java"],
133    libs: ["tradefed", "truth-prebuilt"],
134    static_libs: ["frameworks-base-hostutils", "cts-install-lib-host"],
135    test_config: "apex-rollback-tests.xml",
136    test_suites: ["general-tests"],
137
138    data: [
139        "testdata/trigger_watchdog.rc",
140        "testdata/trigger_watchdog.sh",
141        "testdata/trigger_reboot.sh",
142        ":apex.apexd_test_v2",
143        ":com.android.apex.cts.shim.v2_prebuilt",
144    ],
145}
146
147java_test_host {
148    name: "apexd_host_tests",
149    srcs:  [
150        "src/**/ApexdHostTest.java",
151        ":apex-info-list",
152    ],
153    libs: ["tradefed"],
154    static_libs: [
155        "truth-prebuilt",
156        "apex_manifest_proto_java",
157        "frameworks-base-hostutils",
158        "cts-install-lib-host"
159    ],
160    test_config: "apexd-host-tests.xml",
161    test_suites: ["general-tests"],
162    data: [
163        ":apex.apexd_test",
164        ":apex.apexd_test_v2",
165        ":apex.apexd_test_v2_no_pb",
166        ":apex.apexd_test_v3",
167        ":com.android.apex.cts.shim.v2_prebuilt",
168        ":com.android.apex.cts.shim.v2_no_pb",
169        ":com.android.apex.cts.shim.v2_additional_file_prebuilt",
170    ],
171}
172
173java_test_host {
174    name: "sharedlibs_host_tests",
175    srcs: [
176        "src/**/SharedLibsApexTest.java"
177    ],
178    libs: ["tradefed"],
179    java_resources: [
180        ":com.android.apex.test.bar_stripped.v1.libvX_prebuilt",
181        ":com.android.apex.test.bar_stripped.v2.libvY_prebuilt",
182        ":com.android.apex.test.bar.v1.libvX_prebuilt",
183        ":com.android.apex.test.bar.v2.libvY_prebuilt",
184        ":com.android.apex.test.baz_stripped.v1.libvX_prebuilt",
185        ":com.android.apex.test.foo_stripped.v1.libvX_prebuilt",
186        ":com.android.apex.test.foo_stripped.v2.libvY_prebuilt",
187        ":com.android.apex.test.foo.v1.libvX_prebuilt",
188        ":com.android.apex.test.foo.v2.libvY_prebuilt",
189        ":com.android.apex.test.pony_stripped.v1.libvZ_prebuilt",
190        ":com.android.apex.test.pony.v1.libvZ_prebuilt",
191        ":com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt",
192        ":com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt",
193        ":com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ_prebuilt",
194    ],
195    static_libs: [
196        "compatibility-host-util",
197        "cts-install-lib-host",
198        "frameworks-base-hostutils",
199        "truth-prebuilt"
200    ],
201    test_config: "shared-libs-apex-tests.xml",
202    test_suites: ["general-tests"],
203}
204
205java_test_host {
206    name: "apex_compression_platform_tests",
207    srcs:  ["src/**/ApexCompressionTests.java"],
208    libs: ["tradefed", "truth-prebuilt"],
209    static_libs: ["cts-install-lib-host", "testng"],
210    test_config: "apex_compression_platform_tests.xml",
211    test_suites: ["general-tests"],
212    data: [
213        ":com.android.apex.compressed.v1",
214        ":com.android.apex.compressed.v1_original",
215        ":com.android.apex.compressed.v1_different_digest",
216        ":com.android.apex.compressed.v2",
217        ":gen_manifest_mismatch_compressed_apex_v2",
218        ":apex_compression_tests_app",
219    ],
220}
221
222android_test_helper_app {
223    name: "apex_compression_tests_app",
224    manifest: "app/ApexCompressionTests_AndroidManifest.xml",
225    srcs: ["app/src/**/ApexCompressionTests.java"],
226    static_libs: ["androidx.test.rules", "cts-install-lib", "cts-rollback-lib", "testng"],
227    test_suites: ["general-tests"],
228    java_resources: [
229        ":com.android.apex.compressed.v1_original",
230        ":com.android.apex.compressed.v2_original",
231    ]
232}
233
234java_test_host {
235    name: "apex_apkinapex_tests",
236    srcs:  ["src/**/ApkInApexTests.java"],
237    libs: ["tradefed", "truth-prebuilt"],
238    static_libs: ["cts-install-lib-host", "frameworks-base-hostutils", "testng"],
239    test_config: "apk-in-apex-tests.xml",
240    test_suites: ["general-tests"],
241    data: [
242        ":apex_apkinapex_tests_app",
243    ],
244    java_resources: [
245        ":com.android.apex.product.test",
246        ":com.android.apex.product.app.test.xml",
247        ":com.android.apex.system.test",
248        ":com.android.apex.system.app.test.xml",
249        ":com.android.apex.system_ext.test",
250        ":com.android.apex.system_ext.app.test.xml",
251        ":com.android.apex.vendor.test",
252        ":com.android.apex.vendor.app.test.xml",
253    ],
254}
255
256cc_test_library {
257    name: "libApkInApex_jni",
258    gtest: false,
259    srcs: [
260        "app/jni/com_android_tests_apex_app_ApkInApexTests.cpp",
261    ],
262    cflags: [
263        "-Wall",
264        "-Werror",
265    ],
266    header_libs: [
267        "jni_headers"
268    ],
269    stl: "c++_shared",
270    sdk_version: "current",
271}
272
273java_test_host {
274    name: "apex_apkinapexmaxsdk_tests",
275    srcs: ["src/**/MaxSdkTests.java"],
276    libs: [
277        "tradefed",
278        "truth-prebuilt"
279    ],
280    static_libs: [
281        "cts-install-lib-host",
282        "frameworks-base-hostutils",
283        "testng"
284    ],
285    test_config: "max-sdk-tests.xml",
286    test_suites: ["general-tests"],
287    data: [
288        ":apex_maxsdk_tests_app",
289        ":apex_maxsdk_regular_app_tests",
290    ],
291    java_resources: [
292        ":com.android.apex.maxsdk.test",
293    ],
294}
295
296android_test_helper_app {
297    name: "apex_apkinapex_tests_app",
298    manifest: "app/ApkInApexTests_AndroidManifest.xml",
299    srcs: ["app/src/**/ApkInApexTests.java"],
300    jni_libs: [
301        "libApkInApex_jni",
302    ],
303    static_libs: ["androidx.test.rules", "cts-install-lib", "cts-rollback-lib", "testng"],
304    test_suites: ["general-tests"],
305}
306
307android_test_helper_app {
308    name: "apex_maxsdk_tests_app",
309    manifest: "app/MaxSdkTests_AndroidManifest.xml",
310    srcs: ["app/src/**/MaxSdkTests.java"],
311    static_libs: ["androidx.test.rules", "cts-install-lib", "cts-rollback-lib", "testng"],
312    test_suites: ["general-tests"],
313}
314
315android_test_helper_app {
316    name: "apex_maxsdk_regular_app_tests",
317    manifest: "testdata/maxsdk/app/AndroidManifest_normalApp.xml",
318}
319