From d9cb7daa65dba2e27cc4cf60e531245cf466d0ab Mon Sep 17 00:00:00 2001 From: "Daniel Doubrovkine (dB.)" Date: Tue, 4 May 2021 19:45:04 -0400 Subject: [PATCH] Make -Dtests.output=always actually work. (#648) Signed-off-by: dblock --- TESTING.asciidoc | 2 +- .../java/org/opensearch/gradle/OpenSearchTestBasePlugin.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TESTING.asciidoc b/TESTING.asciidoc index d1c421539b0..d50efa0b5f6 100644 --- a/TESTING.asciidoc +++ b/TESTING.asciidoc @@ -219,7 +219,7 @@ Print all the logging output from the test runs to the commandline even if tests are passing. ------------------------------ -./gradlew test -Dtests.output=always +./gradlew test -Dtests.output=true ------------------------------ Configure the heap size. diff --git a/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchTestBasePlugin.java b/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchTestBasePlugin.java index e8016a9e837..b6dba360ddb 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchTestBasePlugin.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/OpenSearchTestBasePlugin.java @@ -198,6 +198,7 @@ public class OpenSearchTestBasePlugin implements Plugin { logging.setShowExceptions(true); logging.setShowCauses(true); logging.setExceptionFormat("full"); + logging.setShowStandardStreams(Util.getBooleanProperty("tests.output", false)); }); if (OS.current().equals(OS.WINDOWS) && System.getProperty("tests.timeoutSuite") == null) {