File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 11import groovy.transform.Memoized
2+ import org.gradle.api.tasks.testing.TestResult
3+ import org.gradle.api.tasks.testing.TestDescriptor
24
35plugins {
46 // Support for IntelliJ IDEA
@@ -125,7 +127,7 @@ subprojects {
125127 options. addBooleanOption(' html5' , true )
126128 }
127129
128- tasks. withType(Test ) {// Configure all tests
130+ tasks. withType(Test ). configureEach {// Configure all tests
129131
130132 def examplesDir = rootProject. layout. projectDirectory. dir(" key.ui/examples" ). getAsFile()
131133 def runAllProofsReportDir = layout. buildDirectory. dir(" report/runallproves/" ). get(). getAsFile()
@@ -141,12 +143,19 @@ subprojects {
141143
142144 forkEvery = 0 // default
143145 maxParallelForks = 1 // weigl: test on master
144- }
145146
146- tasks. withType(Test ) {
147147 useJUnitPlatform {
148148 includeEngines ' junit-jupiter'
149149 }
150+
151+ // these seems to be missing starting with Gradle 9
152+ testClassesDirs = sourceSets. test. output. classesDirs
153+ classpath = sourceSets. test. runtimeClasspath
154+
155+ // Fail on empty test suites
156+ afterSuite { suite , result ->
157+ assert result. testCount > 0 , " There are no executed test. This is unexpected and should be investigated!"
158+ }
150159 }
151160
152161
You can’t perform that action at this time.
0 commit comments