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.
This commit is contained in:
Yoann Rodière 2019-06-13 08:44:53 +02:00 committed by Guillaume Smet
parent 6e485989f1
commit e7423b076f
2 changed files with 7 additions and 4 deletions

View File

@ -14,7 +14,7 @@ before_script:
- java -version - java -version
- ./gradlew assemble - ./gradlew assemble
script: script:
- ./gradlew check - ./gradlew check -Plog-test-progress=true
before_cache: before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ - rm -fr $HOME/.gradle/caches/*/plugin-resolution/

View File

@ -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 { test {
testLogging { if ( project.findProperty( 'log-test-progress' )?.toString()?.toBoolean() ) {
events "passed", "skipped", "failed" // 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"
}
} }
} }