From: James Procter Date: Sat, 21 Oct 2023 11:48:10 +0000 (+0100) Subject: JAL-4110 allow configuration of stdout/err test output via -Ptest_output=1 and update... X-Git-Tag: Release_2_11_3_0~3^2~37^2~2^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fpatch%2FJAL-4110_stdout_for_tests;p=jalview.git JAL-4110 allow configuration of stdout/err test output via -Ptest_output=1 and update building.md --- 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