You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2019/12/08 20:50:11 UTC
[lucene-solr] 04/04: Only print the slowest tests at the end of a
successful run. Correct verbose mode to parse string switch correctly.
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch gradle-master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit eeb1c9abf6adf1237bfed4b53bb195a37a51e305
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Sun Dec 8 19:06:01 2019 +0100
Only print the slowest tests at the end of a successful run. Correct verbose mode to parse string switch correctly.
---
gradle/testing/defaults-tests.gradle | 2 +-
gradle/testing/slowest-tests-at-end.gradle | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gradle/testing/defaults-tests.gradle b/gradle/testing/defaults-tests.gradle
index 3dcf76c..f42bdba 100644
--- a/gradle/testing/defaults-tests.gradle
+++ b/gradle/testing/defaults-tests.gradle
@@ -5,7 +5,7 @@ def verboseModeHookInstalled = false
allprojects {
plugins.withType(JavaPlugin) {
- def verboseMode = propertyOrDefault("tests.verbose", "false")
+ def verboseMode = Boolean.parseBoolean(propertyOrDefault("tests.verbose", "false"))
project.ext {
testsWorkDir = file("${buildDir}/tmp/tests-cwd")
diff --git a/gradle/testing/slowest-tests-at-end.gradle b/gradle/testing/slowest-tests-at-end.gradle
index b3e6d20..5c26da9 100644
--- a/gradle/testing/slowest-tests-at-end.gradle
+++ b/gradle/testing/slowest-tests-at-end.gradle
@@ -15,8 +15,8 @@ allprojects {
}
}
-gradle.buildFinished {
- if (allTests) {
+gradle.buildFinished { result ->
+ if (allTests && result.getFailure() == null) {
def slowest = allTests
.sort { a, b -> b.duration.compareTo(a.duration) }
.take(10)