From d442030c2a803c88e2dd58f14eaf11df3cc63816 Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Sat, 29 Oct 2016 15:55:27 +0200 Subject: [PATCH] Revert to robolectric 3.1.2 as 3.1.3 does not work at all. --- app/build.gradle | 2 +- .../nodomain/freeyourgadget/gadgetbridge/test/TestBase.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 95cfea571..da90c4b16 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -60,7 +60,7 @@ dependencies { // testCompile 'ch.qos.logback:logback-core:1.1.3' testCompile 'junit:junit:4.12' testCompile "org.mockito:mockito-core:1.9.5" - testCompile "org.robolectric:robolectric:3.1.3" + testCompile "org.robolectric:robolectric:3.1.2" compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.3.0' diff --git a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/TestBase.java b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/TestBase.java index a7120bfd0..91f25328b 100644 --- a/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/TestBase.java +++ b/app/src/test/java/nodomain/freeyourgadget/gadgetbridge/test/TestBase.java @@ -10,7 +10,6 @@ import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; -import org.robolectric.shadows.ShadowLog; import java.io.File; @@ -41,7 +40,8 @@ public abstract class TestBase { @BeforeClass public static void setupSuite() throws Exception { // print everything going to android.util.Log to System.out - ShadowLog.stream = System.out; + System.setProperty("robolectric.logging", "stdout"); +// ShadowLog.stream = System.out; // properties might be preconfigured in build.gradle because of test ordering problems String logDir = System.getProperty(Logging.PROP_LOGFILES_DIR);