1// Copyright (C) 2020 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_helper_app { 20 name: "CtsScopedStorageTestAppA", 21 manifest: "ScopedStorageTestHelper/TestAppA.xml", 22 static_libs: ["cts-scopedstorage-lib"], 23 sdk_version: "test_current", 24 target_sdk_version: "31", 25 min_sdk_version: "30", 26 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 27 // Tag as a CTS artifact 28 test_suites: ["device-tests", "mts-mediaprovider", "cts"], 29} 30android_test_helper_app { 31 name: "CtsScopedStorageTestAppB", 32 manifest: "ScopedStorageTestHelper/TestAppB.xml", 33 static_libs: ["cts-scopedstorage-lib"], 34 sdk_version: "test_current", 35 target_sdk_version: "31", 36 min_sdk_version: "30", 37 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 38 // Tag as a CTS artifact 39 test_suites: ["device-tests", "mts-mediaprovider", "cts"], 40} 41android_test_helper_app { 42 name: "CtsScopedStorageTestAppC", 43 manifest: "ScopedStorageTestHelper/TestAppC.xml", 44 static_libs: ["cts-scopedstorage-lib"], 45 sdk_version: "test_current", 46 target_sdk_version: "31", 47 min_sdk_version: "30", 48 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 49 // Tag as a CTS artifact 50 test_suites: ["device-tests", "mts-mediaprovider", "cts"], 51} 52android_test_helper_app { 53 name: "CtsScopedStorageTestAppC30", 54 manifest: "ScopedStorageTestHelper/TestAppC30.xml", 55 static_libs: ["cts-scopedstorage-lib"], 56 sdk_version: "test_current", 57 target_sdk_version: "30", 58 min_sdk_version: "30", 59 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 60 // Tag as a CTS artifact 61 test_suites: ["device-tests", "mts", "cts"], 62} 63android_test_helper_app { 64 name: "CtsScopedStorageTestAppCLegacy", 65 manifest: "ScopedStorageTestHelper/TestAppCLegacy.xml", 66 static_libs: ["cts-scopedstorage-lib"], 67 sdk_version: "test_current", 68 target_sdk_version: "28", 69 min_sdk_version: "28", 70 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 71 // Tag as a CTS artifact 72 test_suites: ["device-tests", "mts-mediaprovider", "cts"], 73} 74android_test_helper_app { 75 name: "CtsScopedStorageTestAppDLegacy", 76 manifest: "ScopedStorageTestHelper/TestAppDLegacy.xml", 77 static_libs: ["cts-scopedstorage-lib"], 78 sdk_version: "test_current", 79 target_sdk_version: "28", 80 min_sdk_version: "28", 81 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 82 // Tag as a CTS artifact 83 test_suites: ["device-tests", "mts-mediaprovider", "cts"], 84} 85 86android_test_helper_app { 87 name: "CtsScopedStorageTestAppFileManager", 88 manifest: "ScopedStorageTestHelper/TestAppFileManager.xml", 89 static_libs: ["cts-scopedstorage-lib"], 90 sdk_version: "test_current", 91 target_sdk_version: "31", 92 min_sdk_version: "30", 93 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 94 // Tag as a CTS artifact 95 test_suites: ["device-tests", "mts-mediaprovider", "cts"], 96} 97android_test_helper_app { 98 name: "CtsScopedStorageTestAppFileManagerBypassDB", 99 manifest: "ScopedStorageTestHelper/TestAppFileManagerBypassDB.xml", 100 static_libs: ["cts-scopedstorage-lib"], 101 sdk_version: "test_current", 102 target_sdk_version: "31", 103 min_sdk_version: "30", 104 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 105 // Tag as a CTS artifact 106 test_suites: ["device-tests", "mts", "cts"], 107} 108android_test_helper_app { 109 name: "CtsScopedStorageTestAppSystemGalleryBypassDB", 110 manifest: "ScopedStorageTestHelper/TestAppSystemGalleryBypassDB.xml", 111 static_libs: ["cts-scopedstorage-lib"], 112 sdk_version: "test_current", 113 target_sdk_version: "31", 114 min_sdk_version: "30", 115 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 116 // Tag as a CTS artifact 117 test_suites: ["device-tests", "mts", "cts"], 118} 119android_test_helper_app { 120 name: "CtsScopedStorageTestAppSystemGallery30BypassDB", 121 manifest: "ScopedStorageTestHelper/TestAppSystemGallery30BypassDB.xml", 122 static_libs: ["cts-scopedstorage-lib"], 123 sdk_version: "test_current", 124 target_sdk_version: "30", 125 min_sdk_version: "30", 126 srcs: ["ScopedStorageTestHelper/src/**/*.java"], 127 // Tag as a CTS artifact 128 test_suites: ["device-tests", "mts", "cts"], 129} 130 131android_test_helper_app { 132 name: "CtsLegacyStorageTestAppRequestLegacy", 133 manifest: "legacy/requestLegacy.xml", 134 static_libs: ["cts-scopedstorage-lib"], 135 sdk_version: "test_current", 136 target_sdk_version: "29", 137 min_sdk_version: "29", 138} 139 140android_test_helper_app { 141 name: "CtsLegacyStorageTestAppPreserveLegacy", 142 manifest: "legacy/preserveLegacy.xml", 143 static_libs: ["cts-scopedstorage-lib"], 144 sdk_version: "test_current", 145 target_sdk_version: "30", 146 min_sdk_version: "30", 147} 148 149android_test { 150 name: "ScopedStorageTest", 151 manifest: "AndroidManifest.xml", 152 srcs: ["src/**/*.java"], 153 static_libs: ["truth-prebuilt", "cts-scopedstorage-lib"], 154 compile_multilib: "both", 155 test_suites: ["general-tests", "mts-mediaprovider", "cts"], 156 sdk_version: "test_current", 157 target_sdk_version: "31", 158 min_sdk_version: "30", 159 java_resources: [ 160 ":CtsScopedStorageTestAppA", 161 ":CtsScopedStorageTestAppB", 162 ":CtsScopedStorageTestAppC", 163 ":CtsScopedStorageTestAppCLegacy", 164 ] 165} 166 167android_test { 168 name: "LegacyStorageTest", 169 manifest: "legacy/AndroidManifest.xml", 170 srcs: ["legacy/src/**/*.java"], 171 static_libs: ["truth-prebuilt", "cts-scopedstorage-lib"], 172 compile_multilib: "both", 173 test_suites: ["general-tests", "mts-mediaprovider", "cts"], 174 sdk_version: "test_current", 175 target_sdk_version: "29", 176 min_sdk_version: "30", 177 java_resources: [ 178 ":CtsScopedStorageTestAppA", 179 ] 180} 181 182java_test_host { 183 name: "CtsScopedStorageCoreHostTest", 184 srcs: [ 185 "host/src/android/scopedstorage/cts/host/ScopedStorageCoreHostTest.java", 186 "host/src/android/scopedstorage/cts/host/BaseHostTestCase.java" 187 ], 188 libs: ["cts-tradefed", "tradefed", "testng"], 189 test_suites: ["general-tests", "mts-mediaprovider", "cts"], 190 test_config: "CoreTest.xml", 191} 192 193java_test_host { 194 name: "CtsScopedStorageHostTest", 195 srcs: ["host/src/**/*.java"], 196 libs: ["cts-tradefed", "tradefed", "testng"], 197 test_suites: ["general-tests", "mts-mediaprovider", "cts"], 198 test_config: "AndroidTest.xml", 199 data: [ 200 ":CtsLegacyStorageTestAppRequestLegacy", 201 ":CtsLegacyStorageTestAppPreserveLegacy", 202 ], 203} 204 205java_test_host { 206 name: "CtsScopedStoragePublicVolumeHostTest", 207 srcs: ["host/src/**/*.java"], 208 libs: ["cts-tradefed", "tradefed", "testng"], 209 test_suites: ["general-tests", "mts-mediaprovider"], 210 test_config: "PublicVolumeTest.xml", 211} 212 213java_test_host { 214 name: "CtsAppCloningHostTest", 215 srcs: [ 216 "host/src/android/scopedstorage/cts/host/AppCloningHostTest.java", 217 "host/src/android/scopedstorage/cts/host/BaseHostTestCase.java" 218 ], 219 libs: ["cts-tradefed", "tradefed", "testng"], 220 test_suites: ["general-tests", "mts-mediaprovider", "cts"], 221 test_config: "AndroidTestAppCloning.xml", 222} 223 224android_test { 225 name: "CtsScopedStorageDeviceOnlyTest", 226 manifest: "device/AndroidManifest.xml", 227 test_config: "device/AndroidTest.xml", 228 srcs: ["device/**/*.java"], 229 static_libs: ["truth-prebuilt", "cts-scopedstorage-lib",], 230 compile_multilib: "both", 231 test_suites: ["device-tests", "mts-mediaprovider", "cts"], 232 sdk_version: "test_current", 233 target_sdk_version: "31", 234 min_sdk_version: "30", 235 libs: ["android.test.base", "android.test.mock", "android.test.runner",], 236 java_resources: [ 237 ":CtsScopedStorageTestAppA", 238 ":CtsScopedStorageTestAppB", 239 ":CtsScopedStorageTestAppC", 240 ":CtsScopedStorageTestAppC30", 241 ":CtsScopedStorageTestAppCLegacy", 242 ":CtsScopedStorageTestAppDLegacy", 243 ":CtsScopedStorageTestAppFileManager", 244 ":CtsScopedStorageTestAppFileManagerBypassDB", 245 ":CtsScopedStorageTestAppSystemGalleryBypassDB", 246 ":CtsScopedStorageTestAppSystemGallery30BypassDB", 247 ] 248} 249