blob: 5a354a898195682a17d4b04d10553bef69e0ec79 [file] [log] [blame]
android_test_helper_app {
name: "MediaProviderTestAppWithStoragePerms",
manifest: "test_app/TestAppWithStoragePerms.xml",
srcs: [
"test_app/src/**/*.java",
"src/com/android/providers/media/util/TestUtils.java",
],
static_libs: [
"cts-install-lib",
],
sdk_version: "test_current",
test_suites: [
"device-tests",
"mts-mediaprovider",
],
}
android_test_helper_app {
name: "MediaProviderTestAppWithoutPerms",
manifest: "test_app/TestAppWithoutPerms.xml",
srcs: [
"test_app/src/**/*.java",
"src/com/android/providers/media/util/TestUtils.java",
],
static_libs: [
"cts-install-lib",
],
sdk_version: "test_current",
test_suites: [
"device-tests",
"mts-mediaprovider",
],
}
android_test_helper_app {
name: "LegacyMediaProviderTestApp",
manifest: "test_app/LegacyTestApp.xml",
srcs: [
"test_app/src/**/*.java",
"src/com/android/providers/media/util/TestUtils.java",
],
static_libs: [
"cts-install-lib",
],
sdk_version: "test_current",
target_sdk_version: "28",
test_suites: [
"device-tests",
"mts-mediaprovider",
],
}
// This looks a bit awkward, but we need our tests to run against either
// MediaProvider or MediaProviderGoogle, and we don't know which one is
// on the device being tested, so we can't sign our tests with a key that
// will allow instrumentation. Thus we pull all the sources we need to
// run tests against into the test itself.
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "packages_providers_MediaProvider_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["packages_providers_MediaProvider_license"],
}
android_test {
name: "MediaProviderTests",
test_suites: [
"device-tests",
"mts-mediaprovider",
],
compile_multilib: "both",
manifest: "AndroidManifest.xml",
resource_dirs: [
"main_res",
"res",
],
srcs: [
":framework-mediaprovider-sources",
":mediaprovider-sources",
":mediaprovider-testutils",
"src/**/*.java",
],
libs: [
"android.test.base",
"android.test.mock",
"android.test.runner",
"unsupportedappusage",
],
static_libs: [
"androidx.appcompat_appcompat",
"androidx.core_core",
"androidx.test.rules",
"guava",
"mockito-target",
"modules-utils-build",
"truth-prebuilt",
"cts-install-lib",
],
certificate: "media",
aaptflags: ["--custom-package com.android.providers.media"],
errorprone: {
javacflags: [
"-Xep:CatchFail:ERROR",
"-Xep:MissingFail:ERROR",
],
},
java_resources: [
":MediaProviderTestAppWithStoragePerms",
":MediaProviderTestAppWithoutPerms",
":LegacyMediaProviderTestApp",
],
}
filegroup {
name: "mediaprovider-testutils",
srcs: ["utils/**/*.java"],
}