Skip to content

Commit d5298ab

Browse files
fbriconangelozerr
authored andcommitted
build: show failed assertions in gradle builds
Signed-off-by: Fred Bricon <fbricon@gmail.com>
1 parent 0d9b0ac commit d5298ab

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import groovy.time.TimeCategory
2+
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
3+
import org.gradle.api.tasks.testing.logging.TestLogEvent
14

25
plugins {
36
id "org.jetbrains.intellij" version "1.10.1"
@@ -121,6 +124,19 @@ tasks.withType(Test) {
121124
systemProperty 'idea.log.leaked.projects.in.tests', 'false'
122125
systemProperty 'idea.maven.test.mirror', 'https://repo1.maven.org/maven2'
123126
systemProperty 'com.redhat.devtools.intellij.telemetry.mode', 'disabled'
127+
128+
testLogging {
129+
events TestLogEvent.FAILED, TestLogEvent.SKIPPED, TestLogEvent.PASSED
130+
showExceptions true
131+
exceptionFormat TestExceptionFormat.FULL
132+
showCauses true
133+
showStackTraces true
134+
showStandardStreams = false
135+
}
136+
afterTest { descriptor, result ->
137+
def totalTime = TimeCategory.minus(new Date(result.endTime), new Date(result.startTime))
138+
println "$descriptor.name took $totalTime"
139+
}
124140
}
125141

126142
tasks.withType(Copy) {

0 commit comments

Comments
 (0)