aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2018-05-23 11:40:37 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-23 11:42:17 -0700
commit78335554384a1d88d89c91dbb419f8337ab78459 (patch)
tree65afe8ba4ba095d4ea4a977866c4b0a276693678 /src/main/java/com/google/devtools
parent586aedada69d603ed4fc7c6da61c8d9cb86ce808 (diff)
Enable test properties to be exported for robolectric tests.
With this change, all classes in com.google.testing.junit.runner.util will be loaded from the system classloader for robolectric tests. This fixes a problem where TestPropertyExporter and TestIntegrationsRunnerIntegration in the com.google.testing.junit.runner.util package were being loaded twice: once by the test runner into the system classloader, and again into the robolectric's classloader during test execution. Since there were two separate instances, the test properties exported during robolectric's testing lifecycle were disconnected from the test runner which writes out the properties. RELNOTES: none PiperOrigin-RevId: 197761010
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidLocalTest.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidLocalTest.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidLocalTest.java
index 79ca83c0c7..c191eb2661 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidLocalTest.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/BazelAndroidLocalTest.java
@@ -65,6 +65,7 @@ public class BazelAndroidLocalTest extends AndroidLocalTestBase {
.add(
"-Drobolectric-deps.properties=" + androidAllJarsPropertiesFile.getRunfilesPathString())
.add("-Duse_framework_manifest_parser=true")
+ .add("-Dorg.robolectric.packagesToNotAcquire=com.google.testing.junit.runner.util")
.build();
}