aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2020-10-16 20:07:28 -0500
committersonartech <sonartech@sonarsource.com>2020-10-20 20:08:05 +0000
commit9e93ddbf33d5780f62eeffa5f09cba22aede686e (patch)
treedc778878d5223465657fa2a0dadef274d436bf1d /build.gradle
parent884491773414860046bd23cea9fff675a0a95a3c (diff)
downloadsonarqube-9e93ddbf33d5780f62eeffa5f09cba22aede686e.tar.gz
sonarqube-9e93ddbf33d5780f62eeffa5f09cba22aede686e.zip
Improve validation build logging
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle20
1 files changed, 20 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle
index 1bd7a00ba8d..a581bc9f179 100644
--- a/build.gradle
+++ b/build.gradle
@@ -430,6 +430,9 @@ subprojects {
ignore 'sq-version.txt'
}
}
+
+
+ ext.failedTests = []
test {
jvmArgs '-Dfile.encoding=UTF8'
maxHeapSize = '1G'
@@ -449,6 +452,23 @@ subprojects {
// See https://guides.gradle.org/performance/#parallel_test_execution
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
+
+ afterTest { descriptor, result ->
+ if (result.resultType == TestResult.ResultType.FAILURE) {
+ String failedTest = " ${descriptor.className} > ${descriptor.name}"
+ failedTests << failedTest
+ }
+ }
+ }
+
+ gradle.buildFinished {
+ if (!failedTests.empty) {
+ println "\nFailed tests:"
+ failedTests.each { failedTest ->
+ println failedTest
+ }
+ println ""
+ }
}
def protoMainSrc = 'src/main/protobuf'