From d663cc1b27dc4d12b059a74785d7248d4fa560fd Mon Sep 17 00:00:00 2001 From: Zac Sweers Date: Wed, 20 Sep 2023 13:34:48 -0400 Subject: [PATCH] Enable robolectric native graphics by default We've been using this in the slack android repo for a few months now and it's going fine --- slack-plugin/src/main/kotlin/slack/unittest/UnitTests.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/slack-plugin/src/main/kotlin/slack/unittest/UnitTests.kt b/slack-plugin/src/main/kotlin/slack/unittest/UnitTests.kt index b2506e495..74893cf2d 100644 --- a/slack-plugin/src/main/kotlin/slack/unittest/UnitTests.kt +++ b/slack-plugin/src/main/kotlin/slack/unittest/UnitTests.kt @@ -195,6 +195,11 @@ internal object UnitTests { "-Xss1m", // Stack size ) + // TODO would be nice to some day only conditionally apply robolectric args + // Enable Robolectric's new NATIVE graphics mode. + // https://github.com/robolectric/robolectric/releases/tag/robolectric-4.10-alpha-1 + systemProperty("robolectric.graphicsMode", "NATIVE") + if (slackProperties.testVerboseLogging) { // Add additional logging on Jenkins to help debug hanging or OOM-ing unit tests. testLogging {