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", 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 device_common_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 device_common_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 device_common_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 device_common_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: [ 134 "tradefed", 135 "truth", 136 ], 137 static_libs: [ 138 "frameworks-base-hostutils", 139 "cts-install-lib-host", 140 ], 141 test_config: "apex-rollback-tests.xml", 142 test_suites: ["general-tests"], 143 144 data: [ 145 "testdata/trigger_watchdog.rc", 146 "testdata/trigger_watchdog.sh", 147 "testdata/trigger_reboot.sh", 148 ], 149 device_common_data: [ 150 ":apex.apexd_test_v2", 151 ":com.android.apex.cts.shim.v2_prebuilt", 152 ], 153} 154 155java_test_host { 156 name: "apexd_host_tests", 157 srcs: [ 158 "src/**/ApexdHostTest.java", 159 ":apex-info-list", 160 ], 161 libs: ["tradefed"], 162 static_libs: [ 163 "truth", 164 "apex_manifest_proto_java", 165 "frameworks-base-hostutils", 166 "cts-install-lib-host", 167 ], 168 test_config: "apexd-host-tests.xml", 169 test_suites: ["general-tests"], 170 device_common_data: [ 171 ":apex.apexd_test", 172 ":apex.apexd_test_v2", 173 ":apex.apexd_test_v2_no_pb", 174 ":apex.apexd_test_v3", 175 ":com.android.apex.cts.shim.v2_prebuilt", 176 ":com.android.apex.cts.shim.v2_no_pb", 177 ":com.android.apex.cts.shim.v2_additional_file_prebuilt", 178 ":test.good1.com.android.hardware.wifi", 179 ":test.bad1.com.android.hardware.wifi", 180 ":test.bad2.com.android.hardware.wifi", 181 ], 182} 183 184java_test_host { 185 name: "VendorApexHostTestCases", 186 srcs: [ 187 "src/**/VendorApexTests.java", 188 ":apex-info-list", 189 ], 190 libs: [ 191 "compatibility-tradefed", 192 "tradefed", 193 "truth", 194 "hamcrest", 195 "hamcrest-library", 196 ], 197 static_libs: [ 198 "cts-host-utils", 199 "cts-install-lib-host", 200 "frameworks-base-hostutils", 201 "testng", 202 ], 203 device_common_data: [ 204 ":VendorApexTestsApp", 205 ":com.android.apex.vendor.foo", 206 ":com.android.apex.vendor.foo", 207 ":com.android.apex.vendor.foo.apex.all.ready", 208 ":com.android.apex.vendor.foo.bootstrap", 209 ":com.android.apex.vendor.foo.v1_with_service", 210 ":com.android.apex.vendor.bar", 211 ], 212 test_config: "vendor-apex-tests.xml", 213 test_suites: [ 214 "general-tests", 215 ], 216} 217 218android_test_helper_app { 219 name: "VendorApexTestsApp", 220 srcs: ["app/src/**/VendorApexTests.java"], 221 manifest: "app/VendorApexTests_AndroidManifest.xml", 222 static_libs: [ 223 "androidx.test.runner", 224 "androidx.test.core", 225 "truth", 226 "cts-install-lib", 227 "testng", 228 ], 229 sdk_version: "test_current", 230 java_resources: [ 231 ":com.android.apex.vendor.foo.v2", 232 ":com.android.apex.vendor.foo.v2_with_requireNativeLibs", 233 ":com.android.apex.vendor.foo.v2_with_service", 234 ":com.android.apex.vendor.foo.v2_with_wrong_vndk_version", 235 ":com.android.apex.vendor.foo.with_vintf", // v2 236 ":com.android.apex.vendor.bar.v2_with_vintf", 237 ], 238 test_suites: [ 239 "general-tests", 240 ], 241} 242 243java_test_host { 244 name: "sharedlibs_host_tests", 245 srcs: [ 246 "src/**/SharedLibsApexTest.java", 247 ], 248 libs: ["tradefed"], 249 device_common_java_resources: [ 250 ":com.android.apex.test.bar_stripped.v1.libvX_prebuilt", 251 ":com.android.apex.test.bar_stripped.v2.libvY_prebuilt", 252 ":com.android.apex.test.bar.v1.libvX_prebuilt", 253 ":com.android.apex.test.bar.v2.libvY_prebuilt", 254 ":com.android.apex.test.baz_stripped.v1.libvX_prebuilt", 255 ":com.android.apex.test.foo_stripped.v1.libvX_prebuilt", 256 ":com.android.apex.test.foo_stripped.v2.libvY_prebuilt", 257 ":com.android.apex.test.foo.v1.libvX_prebuilt", 258 ":com.android.apex.test.foo.v2.libvY_prebuilt", 259 ":com.android.apex.test.pony_stripped.v1.libvZ_prebuilt", 260 ":com.android.apex.test.pony.v1.libvZ_prebuilt", 261 ":com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", 262 ":com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", 263 ":com.android.apex.test.sharedlibs_secondary_generated.v1.libvZ_prebuilt", 264 ], 265 static_libs: [ 266 "compatibility-host-util", 267 "cts-install-lib-host", 268 "frameworks-base-hostutils", 269 "truth", 270 ], 271 test_config: "shared-libs-apex-tests.xml", 272 test_suites: ["general-tests"], 273} 274 275java_test_host { 276 name: "apex_compression_platform_tests", 277 srcs: ["src/**/ApexCompressionTests.java"], 278 libs: [ 279 "tradefed", 280 "truth", 281 ], 282 static_libs: [ 283 "cts-install-lib-host", 284 "testng", 285 ], 286 test_config: "apex_compression_platform_tests.xml", 287 test_suites: ["general-tests"], 288 device_common_data: [ 289 ":com.android.apex.compressed.v1", 290 ":com.android.apex.compressed.v1{.apex}", 291 ":com.android.apex.compressed.v1_different_digest", 292 ":com.android.apex.compressed.v2", 293 ":gen_manifest_mismatch_compressed_apex_v2", 294 ":apex_compression_tests_app", 295 ], 296} 297 298android_test_helper_app { 299 name: "apex_compression_tests_app", 300 manifest: "app/ApexCompressionTests_AndroidManifest.xml", 301 srcs: ["app/src/**/ApexCompressionTests.java"], 302 static_libs: [ 303 "androidx.test.rules", 304 "cts-install-lib", 305 "cts-rollback-lib", 306 "testng", 307 ], 308 test_suites: ["general-tests"], 309 java_resources: [ 310 ":com.android.apex.compressed.v1{.apex}", 311 ":com.android.apex.compressed.v2_original", 312 ], 313} 314 315java_test_host { 316 name: "apex_apkinapex_tests", 317 srcs: ["src/**/ApkInApexTests.java"], 318 libs: [ 319 "tradefed", 320 "truth", 321 ], 322 static_libs: [ 323 "cts-install-lib-host", 324 "frameworks-base-hostutils", 325 "testng", 326 ], 327 test_config: "apk-in-apex-tests.xml", 328 test_suites: ["general-tests"], 329 device_common_data: [ 330 ":apex_apkinapex_tests_app", 331 ], 332 device_common_java_resources: [ 333 ":com.android.apex.product.test", 334 ":com.android.apex.product.app.test.xml", 335 ":com.android.apex.system.test", 336 ":com.android.apex.system.app.test.xml", 337 ":com.android.apex.system_ext.test", 338 ":com.android.apex.system_ext.app.test.xml", 339 ":com.android.apex.vendor.test", 340 ":com.android.apex.vendor.app.test.xml", 341 ], 342} 343 344cc_test_library { 345 name: "libApkInApex_jni", 346 gtest: false, 347 srcs: [ 348 "app/jni/com_android_tests_apex_app_ApkInApexTests.cpp", 349 ], 350 cflags: [ 351 "-Wall", 352 "-Werror", 353 ], 354 header_libs: [ 355 "jni_headers", 356 ], 357 stl: "c++_shared", 358 sdk_version: "current", 359} 360 361java_test_host { 362 name: "apex_apkinapexmaxsdk_tests", 363 srcs: ["src/**/MaxSdkTests.java"], 364 libs: [ 365 "tradefed", 366 "truth", 367 ], 368 static_libs: [ 369 "cts-install-lib-host", 370 "frameworks-base-hostutils", 371 "testng", 372 ], 373 test_config: "max-sdk-tests.xml", 374 test_suites: ["general-tests"], 375 device_common_data: [ 376 ":apex_maxsdk_tests_app", 377 ":apex_maxsdk_regular_app_tests", 378 ], 379 device_common_java_resources: [ 380 ":com.android.apex.maxsdk.test", 381 ], 382} 383 384android_test_helper_app { 385 name: "apex_apkinapex_tests_app", 386 manifest: "app/ApkInApexTests_AndroidManifest.xml", 387 srcs: ["app/src/**/ApkInApexTests.java"], 388 jni_libs: [ 389 "libApkInApex_jni", 390 ], 391 compile_multilib: "both", 392 static_libs: [ 393 "androidx.test.rules", 394 "cts-install-lib", 395 "cts-rollback-lib", 396 "testng", 397 ], 398 test_suites: ["general-tests"], 399} 400 401android_test_helper_app { 402 name: "apex_maxsdk_tests_app", 403 manifest: "app/MaxSdkTests_AndroidManifest.xml", 404 srcs: ["app/src/**/MaxSdkTests.java"], 405 static_libs: [ 406 "androidx.test.rules", 407 "cts-install-lib", 408 "cts-rollback-lib", 409 "testng", 410 ], 411 test_suites: ["general-tests"], 412} 413 414android_test_helper_app { 415 name: "apex_maxsdk_regular_app_tests", 416 manifest: "testdata/maxsdk/app/AndroidManifest_normalApp.xml", 417} 418