From f6755cf786d55afa7de610a088cabb3a96f35a65 Mon Sep 17 00:00:00 2001 From: James Procter Date: Sat, 21 Oct 2023 12:48:10 +0100 Subject: [PATCH] JAL-4110 allow configuration of stdout/err test output via -Ptest_output=1 and update building.md --- build.gradle | 5 +++-- doc/building.md | 6 ++++++ gradle.properties | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 4aa019c..d4dbcd5 100644 --- a/build.gradle +++ b/build.gradle @@ -1851,8 +1851,9 @@ tasks.withType(Test).matching {t -> t.getName().startsWith("testTask")}.all { te showExceptions true showCauses true showStackTraces true - showStandardStreams true - + if (test_output) { + showStandardStreams true + } info.events = [ TestLogEvent.FAILED ] } diff --git a/doc/building.md b/doc/building.md index 34d5d67..b02fd89 100644 --- a/doc/building.md +++ b/doc/building.md @@ -350,7 +350,13 @@ To exclude one or more groups of tests, add them as a comma separated list in te ```bash gradle test -PtestngExcludedGroups=Not-bamboo ``` +#### Viewing stdout and stderr for tests +By default, gradle doesn't report any of the output or error streams produced by tests. You can enable output by setting the following: + +```bash +gradle test -Ptest_output=1 +``` ### Installer packaging with *install4j* diff --git a/gradle.properties b/gradle.properties index c2e217f..79fb11d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,6 +28,8 @@ jalview_keydig = SHA1 testng_groups = Functional testng_excluded_groups = +test_output = + j8libDir = j8lib j11libDir = j11lib -- 1.7.10.2