Repository: kafka
Updated Branches:
  refs/heads/0.10.0 c91f742de -> 419e6517c


MINOR: Add user overridden test logging events

Author: Guozhang Wang <[email protected]>

Reviewers: Ismael Juma <[email protected]>

Closes #1456 from guozhangwang/Kminor-test-logging

(cherry picked from commit 76ca6f8cc1a6533866a2bd7ca6a7d32314d21dba)
Signed-off-by: Ismael Juma <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/419e6517
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/419e6517
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/419e6517

Branch: refs/heads/0.10.0
Commit: 419e6517c75822d94974628151d399ae93e4a9f0
Parents: c91f742
Author: Guozhang Wang <[email protected]>
Authored: Fri Jun 3 10:30:01 2016 +0100
Committer: Ismael Juma <[email protected]>
Committed: Fri Jun 3 10:30:12 2016 +0100

----------------------------------------------------------------------
 README.md    | 1 +
 build.gradle | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/419e6517/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index e9322b4..91c0980 100644
--- a/README.md
+++ b/README.md
@@ -137,6 +137,7 @@ The following options should be set with a `-D` switch, for 
example `./gradlew -
 * `org.gradle.project.maxParallelForks`: limits the maximum number of 
processes for each task.
 * `org.gradle.project.showStandardStreams`: shows standard out and standard 
error of the test JVM(s) on the console.
 * `org.gradle.project.skipSigning`: skips signing of artifacts.
+* `org.gradle.project.testLoggingEvents`: unit test events to be logged, 
separated by comma. For example `./gradlew 
-Dorg.gradle.project.testLoggingEvents=started,passed,skipped,failed test`
 
 ### Running in Vagrant ###
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/419e6517/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 4864d5a..d076c29 100644
--- a/build.gradle
+++ b/build.gradle
@@ -82,6 +82,8 @@ ext {
 
   userShowStandardStreams = project.hasProperty("showStandardStreams") ? 
showStandardStreams : null
 
+  userTestLoggingEvents = project.hasProperty("testLoggingEvents") ? 
Arrays.asList(testLoggingEvents.split(",")) : null
+
   generatedDocsDir = new File("${project.rootDir}/docs/generated")
 }
 
@@ -156,7 +158,7 @@ subprojects {
   test {
     maxParallelForks = userMaxForks ?: Runtime.runtime.availableProcessors()
     testLogging {
-      events "passed", "skipped", "failed"
+      events = userTestLoggingEvents ?: ["passed", "skipped", "failed"]
       showStandardStreams = userShowStandardStreams ?: false
       exceptionFormat = 'full'
     }

Reply via email to