kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: MINOR: update README with how to run code coverage on module. add reportCoverage at subProject level
Date Fri, 10 Feb 2017 17:15:15 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 9898d665d -> 516d32849


MINOR: update README with how to run code coverage on module. add reportCoverage at subProject
level

Author: Damian Guy <damian.guy@gmail.com>

Reviewers: Ismael Juma <ismael@juma.me.uk>

Closes #2527 from dguy/code-coverage


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

Branch: refs/heads/trunk
Commit: 516d3284943b3fdb0bf1f6208b84210def9a8a9b
Parents: 9898d66
Author: Damian Guy <damian.guy@gmail.com>
Authored: Fri Feb 10 09:15:12 2017 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Fri Feb 10 09:15:12 2017 -0800

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/516d3284/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 1ae5824..c219718 100644
--- a/README.md
+++ b/README.md
@@ -51,8 +51,14 @@ Change the log4j setting in either `clients/src/test/resources/log4j.properties`
     ./gradlew -i -Dtest.single=RequestResponseSerializationTest core:test
 
 ### Generating test coverage reports ###
+Generate coverage reports for the whole project:
+
     ./gradlew reportCoverage
 
+Generate coverage for a single module, i.e.: 
+
+    ./gradlew clients:reportCoverage
+    
 ### Building a binary release gzipped tar ball ###
     ./gradlew clean
     ./gradlew releaseTarGz

http://git-wip-us.apache.org/repos/asf/kafka/blob/516d3284/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 2006f52..417383d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -290,6 +290,10 @@ subprojects {
       }
     }
   }
+
+  def coverageGen = it.path == ':core' ? 'reportScoverage' : 'jacocoTestReport'
+  task reportCoverage(dependsOn: [coverageGen])
+
 }
 
 def fineTuneEclipseClasspathFile(eclipse, project) {
@@ -347,7 +351,7 @@ task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport)
{
   }
 }
 
-task reportCoverage(dependsOn: ['jacocoRootReport', 'core:reportScoverage'])
+task reportCoverage(dependsOn: ['jacocoRootReport', 'core:reportCoverage'])
 
 for ( sv in ['2_10', '2_11', '2_12'] ) {
   String svInDot = sv.replaceAll( "_", ".")


Mime
View raw message