From e7423b076f741396bc67941cd9bd5f7b1c6bfee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Thu, 13 Jun 2019 08:44:53 +0200 Subject: [PATCH] Do not log test progress by default, but provide a build option and enable it for Travis So that the build isn't too verbose when running it locally. --- .travis.yml | 2 +- gradle/java-module.gradle | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e6db2aca3d..6fc0e918dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ before_script: - java -version - ./gradlew assemble script: - - ./gradlew check + - ./gradlew check -Plog-test-progress=true before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ diff --git a/gradle/java-module.gradle b/gradle/java-module.gradle index a0aa2c7bad..07784df33c 100644 --- a/gradle/java-module.gradle +++ b/gradle/java-module.gradle @@ -217,10 +217,13 @@ test { } } -// Log a statement for each test, so that Travis doesn't end up panicking because when there's no output for a long time test { - testLogging { - events "passed", "skipped", "failed" + if ( project.findProperty( 'log-test-progress' )?.toString()?.toBoolean() ) { + // Log a statement for each test. + // Used in the Travis build so that Travis doesn't end up panicking because there's no output for a long time. + testLogging { + events "passed", "skipped", "failed" + } } }