Skip to content

Commit

Permalink
Merge pull request #1805 from robstoll/chore/avoid-double-test-reporting
Browse files Browse the repository at this point in the history
vlsi.gradle-extensions prints error as well, hence remove FAILED event
  • Loading branch information
robstoll authored Aug 3, 2024
2 parents 29a8e0a + 663303b commit 0fcaef2
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 0fcaef2

Please sign in to comment.