diff options
author | 2017-11-27 21:34:52 -0800 | |
---|---|---|
committer | 2017-11-27 21:36:50 -0800 | |
commit | 25eab014b36753d3b959f4f5f883d0c6ea2ccaad (patch) | |
tree | 2103dbae8275d9abedf4bd0c7fd0ed3b815c452f /src/test/java/com/google/devtools/build/lib/rules/android | |
parent | 3e99e06c050e4d54478801753f5ef705f74dda49 (diff) |
Change Mock{Android,Java}Support to actually import test runner related jars so that integration tests can use them.
RELNOTES: None
PiperOrigin-RevId: 177113967
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/android')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTest.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTest.java index 3544d0974d..83f72f10d2 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/android/AbstractAndroidLocalTestTest.java @@ -94,12 +94,13 @@ public abstract class AbstractAndroidLocalTestTest extends BuildViewTestCase { "java/test/resource/dummyTest_resources.jar", "third_party/java/junit/junit.jar", "third_party/java/android/android_sdk_linux/platforms/stable/android_blaze.jar", - "third_party/java/robolectric/robolectric.jar", - "java/com/google/thirdparty/robolectric/robolectric.jar", + "third_party/java/robolectric/third_party_java_robolectric_deploy.jar", + "java/com/google/thirdparty/robolectric/" + + "java_com_google_thirdparty_robolectric_deploy.jar", "java/test/resource/libdummyLibraryOne.jar", "java/test/resource/libdummyLibraryTwo.jar", "java/test/resource/libdummyLibraryThree.jar", - "java/com/google/testing/junit/runner/librunner.jar") + "java/com/google/testing/junit/runner/Runner_deploy.jar") .inOrder(); } @@ -107,7 +108,12 @@ public abstract class AbstractAndroidLocalTestTest extends BuildViewTestCase { public void testCollectCodeCoverageWorks() throws Exception { writeFile("java/test/BUILD", "android_local_test(name = 'dummyTest',", - " srcs = [ 'test.java'])"); + " srcs = [ 'test.java'],", + " deps = [ '//java/foo:lib' ])"); + + writeFile("java/foo/BUILD", + "java_library(name = 'lib',", + "srcs = ['foo.java'])"); useConfiguration("--collect_code_coverage"); checkMainClass(getConfiguredTarget("//java/test:dummyTest"), |