Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 1 | // This looks a bit awkward, but we need our tests to run against either |
| 2 | // MediaProvider or MediaProviderGoogle, and we don't know which one is |
| 3 | // on the device being tested, so we can't sign our tests with a key that |
| 4 | // will allow instrumentation. Thus we pull all the sources we need to |
| 5 | // run tests against into the test itself. |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 6 | android_test { |
| 7 | name: "MediaProviderTests", |
Jeff Sharkey | 113f34d | 2019-12-08 15:27:56 -0700 | [diff] [blame] | 8 | test_suites: [ |
| 9 | "device-tests", |
| 10 | "mts", |
| 11 | ], |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 12 | |
| 13 | manifest: "AndroidManifest.xml", |
| 14 | |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 15 | resource_dirs: [ |
| 16 | "main_res", |
| 17 | "res", |
| 18 | ], |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 19 | srcs: [ |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 20 | ":mediaprovider-sources", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 21 | "src/**/*.java", |
| 22 | ], |
| 23 | |
| 24 | libs: [ |
| 25 | "android.test.base", |
| 26 | "android.test.mock", |
| 27 | "android.test.runner", |
Artur Satayev | 2bb438d | 2020-01-23 15:26:14 +0000 | [diff] [blame^] | 28 | "unsupportedappusage", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 29 | ], |
| 30 | |
| 31 | static_libs: [ |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 32 | "androidx.appcompat_appcompat", |
| 33 | "androidx.core_core", |
Brett Chabot | c3a0f78 | 2018-12-13 19:06:19 -0800 | [diff] [blame] | 34 | "androidx.test.rules", |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 35 | "guava", |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 36 | "mockito-target", |
| 37 | ], |
| 38 | |
| 39 | certificate: "media", |
| 40 | |
Jeff Sharkey | c55994b | 2019-12-20 19:43:59 -0700 | [diff] [blame] | 41 | aaptflags: ["--custom-package com.android.providers.media"], |
felkachang | 775842b | 2018-10-16 17:05:44 +0800 | [diff] [blame] | 42 | } |