Fail randomized testing tasks if no tests ran (#37764)

Reverts #36259 in part to make randomized test fail if no tests are ran.
This is useful when filtering tests as it's easy to make a typo and
think the test ran trough successfully.
This commit is contained in:
Alpar Torok 2019-01-24 17:33:08 +02:00 committed by GitHub
parent 37768b7eac
commit f6b6f927ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -904,6 +904,7 @@ class BuildPlugin implements Plugin<Project> {
project.tasks.withType(RandomizedTestingTask) {task ->
jvm "${project.runtimeJavaHome}/bin/java"
parallelism System.getProperty('tests.jvms', project.rootProject.ext.defaultParallel)
ifNoTests 'fail'
onNonEmptyWorkDirectory 'wipe'
leaveTemporary true
project.sourceSets.matching { it.name == "test" }.all { test ->