blob: 3d956ef4d8af38858fce0c173f5568395b6cd715 [file] [log] [blame]
Jeff Sharkeyc55994b2019-12-20 19:43:59 -07001// 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.
felkachang775842b2018-10-16 17:05:44 +08006android_test {
7 name: "MediaProviderTests",
Jeff Sharkey113f34d2019-12-08 15:27:56 -07008 test_suites: [
9 "device-tests",
10 "mts",
11 ],
felkachang775842b2018-10-16 17:05:44 +080012
13 manifest: "AndroidManifest.xml",
14
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070015 resource_dirs: [
16 "main_res",
17 "res",
18 ],
felkachang775842b2018-10-16 17:05:44 +080019 srcs: [
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070020 ":mediaprovider-sources",
felkachang775842b2018-10-16 17:05:44 +080021 "src/**/*.java",
22 ],
23
24 libs: [
25 "android.test.base",
26 "android.test.mock",
27 "android.test.runner",
Artur Satayev2bb438d2020-01-23 15:26:14 +000028 "unsupportedappusage",
felkachang775842b2018-10-16 17:05:44 +080029 ],
30
31 static_libs: [
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070032 "androidx.appcompat_appcompat",
33 "androidx.core_core",
Brett Chabotc3a0f782018-12-13 19:06:19 -080034 "androidx.test.rules",
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070035 "guava",
felkachang775842b2018-10-16 17:05:44 +080036 "mockito-target",
37 ],
38
39 certificate: "media",
40
Jeff Sharkeyc55994b2019-12-20 19:43:59 -070041 aaptflags: ["--custom-package com.android.providers.media"],
felkachang775842b2018-10-16 17:05:44 +080042}