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:
parent
37768b7eac
commit
f6b6f927ec
|
@ -904,6 +904,7 @@ class BuildPlugin implements Plugin<Project> {
|
||||||
project.tasks.withType(RandomizedTestingTask) {task ->
|
project.tasks.withType(RandomizedTestingTask) {task ->
|
||||||
jvm "${project.runtimeJavaHome}/bin/java"
|
jvm "${project.runtimeJavaHome}/bin/java"
|
||||||
parallelism System.getProperty('tests.jvms', project.rootProject.ext.defaultParallel)
|
parallelism System.getProperty('tests.jvms', project.rootProject.ext.defaultParallel)
|
||||||
|
ifNoTests 'fail'
|
||||||
onNonEmptyWorkDirectory 'wipe'
|
onNonEmptyWorkDirectory 'wipe'
|
||||||
leaveTemporary true
|
leaveTemporary true
|
||||||
project.sourceSets.matching { it.name == "test" }.all { test ->
|
project.sourceSets.matching { it.name == "test" }.all { test ->
|
||||||
|
|
Loading…
Reference in New Issue