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: "CtsAppTestCases", 21 defaults: ["cts_defaults"], 22 libs: [ 23 "android.test.runner", 24 "org.apache.http.legacy", 25 "android.test.base", 26 ], 27 static_libs: [ 28 "compatibility-device-util-axt", 29 "ctstestrunner-axt", 30 "ctstestserver", 31 "cts-wm-util", 32 "mockito-target-minus-junit4", 33 "androidx.test.ext.junit", 34 "androidx.test.rules", 35 "platform-test-annotations", 36 "platformprotosnano", 37 "permission-test-util-lib", 38 "CtsAppTestStubsShared", 39 ], 40 srcs: [ 41 "src/**/*.java", 42 "src/**/*.kt", 43 ], 44 // Tag this module as a cts test artifact 45 test_suites: [ 46 "cts", 47 "general-tests", 48 "sts", 49 ], 50 instrumentation_for: "CtsAppTestStubs", 51 sdk_version: "test_current", 52 // 21 required for multi-dex. 53 min_sdk_version: "21", 54 // Disable coverage since it pushes us over the dex limit and we don't 55 // actually need to measure the tests themselves. 56 jacoco: { 57 exclude_filter: ["**"], 58 }, 59 // Even with coverage disabled, we're close to the single dex limit, so allow use of multi-dex. 60 dxflags: ["--multi-dex"], 61 data: [ 62 ":CtsSimpleApp", 63 ":CtsAppTestDelayedStart", 64 ":CtsAppTestStubs", 65 ":CtsAppTestStubsApp1", 66 ":CtsAppTestStubsApp3", 67 ":CtsAppTestStubsApp2", 68 ":CtsAppTestStubsApi30", 69 ":CtsAppTestWedgedStart", 70 ":CtsBadProviderStubs", 71 ":CtsCantSaveState1", 72 ":CtsCantSaveState2", 73 ":StorageDelegator", 74 ":CtsActivityManagerApi29", 75 ":WallpaperTest", 76 ], 77 per_testcase_directory: true, 78} 79 80android_test { 81 name: "CtsDownloadManagerApi28", 82 defaults: ["cts_defaults"], 83 libs: [ 84 "android.test.runner", 85 "org.apache.http.legacy", 86 "android.test.base", 87 ], 88 static_libs: [ 89 "compatibility-device-util-axt", 90 "ctstestrunner-axt", 91 "ctstestserver", 92 "mockito-target-minus-junit4", 93 "androidx.test.rules", 94 "platform-test-annotations", 95 ], 96 srcs: [ 97 "DownloadManagerApi28Test/src/**/*.java", 98 "src/android/app/cts/DownloadManagerTestBase.java", 99 ], 100 resource_dirs: ["app/res"], 101 asset_dirs: ["app/assets"], 102 // Tag this module as a cts test artifact 103 test_suites: [ 104 "cts", 105 "general-tests", 106 ], 107 sdk_version: "test_current", 108 min_sdk_version: "14", 109 manifest: "DownloadManagerApi28Test/AndroidManifest.xml", 110 test_config: "DownloadManagerApi28Test/AndroidTest.xml", 111 lint: { 112 baseline_filename: "lint-baseline-api-28.xml", 113 }, 114} 115 116android_test { 117 name: "CtsDownloadManagerInstaller", 118 defaults: ["cts_defaults"], 119 libs: [ 120 "android.test.runner", 121 "org.apache.http.legacy", 122 "android.test.base", 123 ], 124 static_libs: [ 125 "compatibility-device-util-axt", 126 "ctstestrunner-axt", 127 "ctstestserver", 128 "mockito-target-minus-junit4", 129 "androidx.test.rules", 130 "platform-test-annotations", 131 ], 132 srcs: [ 133 "DownloadManagerInstallerTest/src/**/*.java", 134 "src/android/app/cts/DownloadManagerTestBase.java", 135 ], 136 resource_dirs: ["app/res"], 137 asset_dirs: ["app/assets"], 138 // Tag this module as a cts test artifact 139 test_suites: [ 140 "cts", 141 "general-tests", 142 ], 143 sdk_version: "test_current", 144 min_sdk_version: "14", 145 manifest: "DownloadManagerInstallerTest/AndroidManifest.xml", 146 test_config: "DownloadManagerInstallerTest/AndroidTest.xml", 147 lint: { 148 baseline_filename: "lint-baseline-installer.xml", 149 }, 150} 151 152android_test { 153 name: "CtsAppExitTestCases", 154 defaults: ["cts_defaults"], 155 libs: [ 156 "android.test.runner", 157 "org.apache.http.legacy", 158 "android.test.base", 159 ], 160 static_libs: [ 161 "androidx.test.uiautomator_uiautomator", 162 "androidx.test.rules", 163 "compatibility-device-util-axt", 164 "CtsExternalServiceCommon", 165 "cts-wm-util", 166 "libprotobuf-java-lite", 167 ], 168 aidl: { 169 local_include_dirs: ["app/src"], 170 }, 171 srcs: [ 172 ":libtombstone_proto-src", 173 "AppExitTest/src/**/*.java", 174 "app/src/**/*.aidl", 175 "src/android/app/cts/android/app/cts/tools/WatchUidRunner.java", 176 ], 177 jarjar_rules: "AppExitTest/jarjar-rules.txt", 178 test_suites: [ 179 "cts", 180 "general-tests", 181 ], 182 manifest: "AppExitTest/AndroidManifest.xml", 183 test_config: "AppExitTest/AndroidTest.xml", 184 platform_apis: true, 185 data: [ 186 ":CtsSimpleApp", 187 ":CtsExternalServiceService", 188 ":CtsAppTestStubs", 189 ], 190 per_testcase_directory: true, 191} 192 193android_test { 194 name: "CtsAppFgsTestCases", 195 defaults: ["cts_defaults"], 196 libs: [ 197 "android.test.runner", 198 "org.apache.http.legacy", 199 "android.test.base", 200 ], 201 static_libs: [ 202 "androidx.test.uiautomator_uiautomator", 203 "androidx.test.rules", 204 "compatibility-device-util-axt", 205 "CtsExternalServiceCommon", 206 "cts-wm-util", 207 "libprotobuf-java-lite", 208 ], 209 aidl: { 210 local_include_dirs: ["app/src"], 211 }, 212 srcs: [ 213 "FgsTest/src/**/*.java", 214 "app/src/**/*.aidl", 215 "app/src/android/app/stubs/ScreenOnActivity.java", 216 "src/android/app/cts/android/app/cts/tools/WatchUidRunner.java", 217 "FgsTestHelper/src/android/app/fgstesthelper/LocalForegroundServiceBase.java", 218 ], 219 test_suites: [ 220 "cts", 221 "general-tests", 222 ], 223 instrumentation_for: "CtsAppTestFgsTestHelper", 224 manifest: "FgsTest/AndroidManifest.xml", 225 test_config: "FgsTest/AndroidTest.xml", 226 platform_apis: true, 227 data: [ 228 ":CtsAppTestFgsTestHelper", 229 ":CtsAppTestFgsTestHelperCurrent", 230 ":CtsAppTestFgsTestHelperApi33", 231 ], 232 per_testcase_directory: true, 233} 234