Skip to content

Commit a0fd768

Browse files
authored
FIX: URGENT: Changes in Gradle 9 results into non-execution of custom test tasks. (#3653)
2 parents 852b330 + aa71510 commit a0fd768

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

build.gradle

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ subprojects {
125125
options.addBooleanOption('html5', true)
126126
}
127127

128-
tasks.withType(Test) {//Configure all tests
128+
tasks.withType(Test).configureEach {//Configure all tests
129129

130130
def examplesDir = rootProject.layout.projectDirectory.dir("key.ui/examples").getAsFile()
131131
def runAllProofsReportDir = layout.buildDirectory.dir("report/runallproves/").get().getAsFile()
@@ -141,12 +141,19 @@ subprojects {
141141

142142
forkEvery = 0 //default
143143
maxParallelForks = 1 // weigl: test on master
144-
}
145144

146-
tasks.withType(Test) {
147145
useJUnitPlatform {
148146
includeEngines 'junit-jupiter'
149147
}
148+
149+
// these seems to be missing starting with Gradle 9
150+
testClassesDirs = sourceSets.test.output.classesDirs
151+
classpath = sourceSets.test.runtimeClasspath
152+
153+
// Fail on empty test suites
154+
afterSuite { suite, result ->
155+
assert result.testCount > 0, "There are no executed test. This is unexpected and should be investigated!"
156+
}
150157
}
151158

152159

0 commit comments

Comments
 (0)