1//##########################################################
2// Package w/ tests
3
4package {
5    default_team: "trendy_team_framework_android_packages",
6    default_applicable_licenses: ["Android-Apache-2.0"],
7}
8
9android_test_helper_app {
10    name: "CtsPrivilegedUpdateTests",
11    defaults: ["cts_support_defaults"],
12    sdk_version: "test_current",
13    static_libs: [
14        "androidx.test.rules",
15        "compatibility-device-util-axt",
16        "ctstestrunner-axt",
17    ],
18    libs: ["android.test.base"],
19    // Tag this module as a cts test artifact
20    test_suites: [
21        "cts",
22        "general-tests",
23    ],
24    optimize: {
25        enabled: false,
26    },
27    dex_preopt: {
28        enabled: false,
29    },
30    srcs: ["src/**/*.java"],
31}
32
33//##########################################################
34// Variant: Privileged app upgrade
35
36android_test_import {
37    name: "CtsShimPrivUpgradePrebuilt",
38    // Make sure the build system doesn't try to resign the APK
39    presigned: true,
40    preprocessed: true,
41    test_suites: [
42        "cts",
43        "general-tests",
44    ],
45    // The 'arm' apk has both arm and arm64 so's. Same for x86/x86_64.
46    arch: {
47        arm: {
48            apk: "apk/arm/CtsShimPrivUpgrade.apk",
49        },
50        arm64: {
51            apk: "apk/arm/CtsShimPrivUpgrade.apk",
52        },
53        x86: {
54            apk: "apk/x86/CtsShimPrivUpgrade.apk",
55        },
56        x86_64: {
57            apk: "apk/x86/CtsShimPrivUpgrade.apk",
58        },
59        riscv64: {
60            // This apk has compressed JNI libraries when it shouldn't if it's presigned
61            skip_preprocessed_apk_checks: true,
62            apk: "apk/riscv64/CtsShimPrivUpgrade.apk",
63        },
64    },
65}
66
67//##########################################################
68// Variant: Privileged app upgrade (wrong SHA)
69
70android_test_import {
71    name: "CtsShimPrivUpgradeWrongSHAPrebuilt",
72    // Make sure the build system doesn't try to resign the APK
73    presigned: true,
74    preprocessed: true,
75    test_suites: [
76        "cts",
77        "general-tests",
78    ],
79    arch: {
80        arm: {
81            apk: "apk/arm/CtsShimPrivUpgradeWrongSHA.apk",
82        },
83        arm64: {
84            apk: "apk/arm/CtsShimPrivUpgradeWrongSHA.apk",
85        },
86        x86: {
87            apk: "apk/x86/CtsShimPrivUpgradeWrongSHA.apk",
88        },
89        x86_64: {
90            apk: "apk/x86/CtsShimPrivUpgradeWrongSHA.apk",
91        },
92        riscv64: {
93            // This apk has compressed JNI libraries when it shouldn't if it's presigned
94            skip_preprocessed_apk_checks: true,
95            apk: "apk/riscv64/CtsShimPrivUpgradeWrongSHA.apk",
96        },
97    },
98}
99