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
- ./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/

View File

@ -217,11 +217,14 @@ 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 {
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"
}
}
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~