Skip to content

Commit

Permalink
vlsi.gradle-extensions prints error as well, hence remove FAILED event
Browse files Browse the repository at this point in the history
  • Loading branch information
robstoll committed Aug 2, 2024
1 parent 641205d commit 663303b
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.kotlin.dsl.extra
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
import org.gradle.testing.jacoco.tasks.JacocoReport
Expand Down Expand Up @@ -31,3 +32,17 @@ plugins.withId("jacoco") {
}
}
}


//TODO 1.4.0 move this bit to tutteli-gradle-plugins, could be done there depending if com.github.vlsi.gradle-extensions
// is applied or not

// adjust because we use com.github.vlsi.gradle-extensions which prints tests differently, otherwise we print
// the failed tests twice.
tasks.withType<Test>().configureEach {
testLogging {
// Empty enum throws "Collection is empty", so we use Iterable method
setEvents((events - TestLogEvent.FAILED) as Iterable<TestLogEvent>)
showStackTraces = false
}
}

0 comments on commit 663303b

Please sign in to comment.