• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2008 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
19android_test {
20    name: "CtsContentTestCases",
21    defaults: ["cts_defaults"],
22
23    // Don't run manifestmerger on dependencies, it is unhappy with the duplicate
24    // REQUIRED_MULTI_DENY permissions in AndroidManifest.xml
25    dont_merge_manifests: true,
26    // Include both the 32 and 64 bit versions
27    compile_multilib: "both",
28    jni_libs: [
29        "libcts_jni",
30        "libnativecursorwindow_jni",
31        "libnativehelper_compat_libc++",
32    ],
33    libs: [
34        "android.test.runner",
35        "android.test.base",
36        "android.test.mock",
37    ],
38    static_libs: [
39        "apache-commons-compress",
40        "compatibility-device-util-axt",
41        "ctstestrunner-axt",
42        "services.core",
43        "junit",
44        "truth-prebuilt",
45        "accountaccesslib",
46        // TODO: remove once Android migrates to JUnit 4.12, which provides assertThrows:
47        "testng",
48        "androidx.legacy_legacy-support-v4",
49        "androidx.test.core",
50        "androidx.test.uiautomator_uiautomator",
51        "cts-install-lib",
52        "ShortcutManagerTestUtils",
53        "libincfs-prebuilt",
54        "HelloWorldResHardeningLib",
55        "Nene",
56        "Harrier",
57        "platformprotosnano",
58    ],
59    // Use multi-dex as the compatibility-common-util-devicesidelib dependency
60    // on compatibility-device-util-axt pushes us beyond 64k methods.
61    dxflags: ["--multi-dex"],
62    // Resource unit tests use a private locale and some densities
63    aapt_include_all_resources: true,
64    aaptflags: [
65        "-c cs",
66        "-c fil,fil-rPH,fil-rSA",
67        "-c fr,fr-rFR",
68        "-c iw,iw-rIL",
69        "-c kok,b+kok+419,b+kok+419+variant,b+kok+IN,b+kok+Knda,b+kok+Knda+419,b+kok+Knda+419+variant",
70        "-c b+kok+variant",
71        "-c mk,mk-rMK",
72        "-c tl,tl-rPH",
73        "-c tgl,tgl-rPH",
74        "-c tlh",
75        "-c xx,xx-rYY",
76    ],
77    srcs: [
78        "src/**/*.java",
79        "src/**/*.kt",
80        "BinderPermissionTestService/**/I*.aidl",
81    ],
82    per_testcase_directory: true,
83    data: [
84        ":CtsContentDirectBootUnawareTestApp",
85        ":CtsContentMockLauncherTestApp",
86        ":CtsContentMockRestrictedApp",
87        ":CtsContentLongLabelNameTestApp",
88        ":CtsContentPartiallyDirectBootAwareTestApp",
89        ":CtsIntentResolutionTestApp",
90        ":CtsSyncAccountAccessStubs",
91        ":CtsContentEmptyTestApp",
92        ":CtsContentMaxPackageNameTestApp",
93        ":CtsBinderPermissionTestService",
94        ":CtsIntentResolutionTestAppApi30",
95        ":CtsContentLongSharedUserIdTestApp",
96        ":CtsContentMaxSharedUserIdTestApp",
97        ":CtsContentLongPackageNameTestApp",
98        ":CtsContentNoApplicationTestApp",
99        ":CtsContentLongUsesPermissionNameTestApp",
100        ":CtsApkVerityTestPrebuiltFiles",
101        // v1/v2/v3/v4 signed version of android.appsecurity.cts.tinyapp to keep checksums stable
102        "data/CtsPkgInstallTinyAppV1.apk",
103        "data/CtsPkgInstallTinyAppV2V3V4.apk",
104        "data/CtsPkgInstallTinyAppV2V3V4.apk.idsig",
105        "data/CtsPkgInstallTinyAppV2V3V4.digests",
106        "data/CtsPkgInstallTinyAppV2V3V4.digests.signature",
107        "data/CtsPkgInstallTinyAppV2V3V4-Sha512withEC.apk",
108        "data/CtsPkgInstallTinyAppV2V3V4-Sha512withEC.apk.idsig",
109        "data/CtsPkgInstallTinyAppV2V3V4-Verity.apk",
110        "data/CtsPkgInstallTinyAppV2V3V4-Verity.apk.idsig",
111        "data/HelloWorld5.digests",
112        "data/HelloWorld5.digests.signature",
113        "data/HelloWorld5_hdpi-v4.digests",
114        "data/HelloWorld5_hdpi-v4.digests.signature",
115        "data/HelloWorld5_mdpi-v4.digests",
116        "data/HelloWorld5_mdpi-v4.digests.signature",
117        "data/malformed.apk.idsig",
118        "data/test-cert.x509.pem",
119        ":HelloWorld5",
120        ":HelloWorld5Profileable",
121        ":HelloWorld7",
122        ":HelloWorldNoAppStorage",
123        ":HelloWorldResHardening",
124        ":HelloWorldSdk1",
125        ":HelloWorldSdk1DifferentSigner",
126        ":HelloWorldSdk1MajorVersion2",
127        ":HelloWorldSdk1Updated",
128        ":HelloWorldSdk2",
129        ":HelloWorldSdk2Updated",
130        ":HelloWorldSdk3UsingSdk1",
131        ":HelloWorldSdk3UsingSdk1And2",
132        ":HelloWorldShell",
133        ":HelloWorldUsingSdk1",
134        ":HelloWorldUsingSdk1And2",
135        ":HelloWorldUsingSdk3",
136        ":HelloWorldNoAppStorage",
137        ":HelloWorldLotsOfFlags",
138        ":HelloWorldWithSufficient",
139        ":HelloSufficientVerifierReject",
140        ":HelloVerifierAllow",
141        ":HelloVerifierReject",
142        ":HelloVerifierDelayedReject",
143        ":HelloVerifierDisabled",
144    ],
145    java_resources: [
146        ":PackagePropertyTestApp1",
147        ":PackagePropertyTestApp2",
148        ":PackagePropertyTestApp3",
149        ":TestInstallerApp",
150    ],
151    platform_apis: true,
152    // Tag this module as a cts test artifact
153    test_suites: [
154        "cts",
155        "general-tests",
156        "mts-documentsui",
157    ],
158    min_sdk_version: "29",
159    replace_max_sdk_version_placeholder: "current",
160}
161