Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZOOKEEPER-2955: Enable Clover code coverage report #443

Closed
wants to merge 8 commits into from

Conversation

@mfenes
Copy link
Contributor

mfenes commented Jan 8, 2018

ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Copy link
Contributor

anmolnar left a comment

@mfenes Looks good to me.
Just a minor improvement: I think it would be more convenient to use build/test directory as clover home instead of requesting CLOVER_HOME environment variable to be set.

ivy.xml Outdated
@@ -133,6 +133,8 @@
<dependency org="org.codehaus.jackson" name="jackson-mapper-asl"
rev="${jackson-mapper-asl.version}" conf="optional->default"/>

<dependency org="org.openclover" name="clover" rev="${clover.version}"/>

This comment has been minimized.

Copy link
@phunt

phunt Jan 18, 2018

Contributor

doesn't this need to be in it's own conf, similar to owasp, releaseaudit, etc.. ?

@phunt

This comment has been minimized.

Copy link
Contributor

phunt commented Jan 18, 2018

It's been a while since I used clover - I didn't notice on the JIRA. Do we need a license at this point to run clover? Is this setup consistent with being able to run clover on apache jenkins or is the intent to only run on a local host?

@anmolnar

This comment has been minimized.

Copy link
Contributor

anmolnar commented Jan 18, 2018

@phunt This one is OpenClover which the open source version of Clover. Afaik it's under Apache 2.0 license, but @mfenes please correct me if I'm wrong.

@mfenes

This comment has been minimized.

Copy link
Contributor Author

mfenes commented Jan 18, 2018

@phunt According to OpenClover 4.2.0 Release Notes at http://openclover.org/doc/openclover-4.2.0-release-notes.html
"No license key required
OpenClover requires no license key, in some places you may see a "Clover free edition" message. You no longer need any external license key to run it. In case you still pass the license key issued by Atlassian in your builds (e.g. via -Dclover.license.path JVM property), it will be ignored and the built-in one will be used."

Regarding being able to run OpenClover on Apache Jenkins: I think we can configure a Jenkins job to generate code coverage reports since OpenClover does not need any installation, it's just a clover-4.2.1.jar file in /build/test/lib. However we would need a storage space to store the generated coverage reports as otherwise it would be deleted when the /build directory is cleaned. Also I would mention that OpenClover needs ZK to be compiled using the
-Drun.clover=true option in order to use source code instrumentation and ZK compiled with source code instrumentation should not be used for production, only just for testing and generating coverage reports.

@mfenes

This comment has been minimized.

Copy link
Contributor Author

mfenes commented Jan 18, 2018

@anmolnar Yes, OpenClover's Intellectual property protection page http://openclover.org/doc/manual/4.2.0/developer-guide--intellectual-property-protection.html says that

  • Clover Core is licensed under Apache 2.0 License
  • Most of Clover plugins are licensed under Apache 2.0 License
  • Bamboo Clover Plugin is proprietary software, see Bamboo Clover Plugin Developer Guide
  • Clover documentation on confluence.atlassian.com is under Creative Commons License, see Contributing to the Clover Documentation
@phunt

This comment has been minimized.

Copy link
Contributor

phunt commented Jan 19, 2018

OK. Can you address the other f/b then? (ivy.xml). @afine any thoughts on this wrt the classpath issues we've been facing. I assume the ivy.xml change would be sufficient? Please help verify.

Added test-coverage-java configuration to ivy.xml and added ant target with the same name
to make coverage report generation even simpler.
@mfenes

This comment has been minimized.

Copy link
Contributor Author

mfenes commented Jan 22, 2018

@anmolnar Clover home is now set to test.java.build.dir. No need to configure CLOVER_HOME environment variable.

@mfenes

This comment has been minimized.

Copy link
Contributor Author

mfenes commented Jan 22, 2018

@phunt I've added ivy.xml configuration for Clover: test-coverage-java and created an ant target with the same name, so generating a coverage report for Java became as simple as running ant test-coverage-java.

build.xml Outdated
@@ -124,6 +160,7 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<property name="ivy.javacc.lib" value="${build.dir}/javacc/lib"/>
<property name="ivy.releaseaudit.lib" value="${build.dir}/releaseaudit/lib"/>
<property name="ivy.owasp.lib" value="${build.dir}/owasp/lib"/>
<property name="ivy.coverage.lib" value="${test.java.build.dir}/lib"/>

This comment has been minimized.

Copy link
@phunt

phunt Jan 22, 2018

Contributor

This directory is inconsistent with all the other tools - why?

This comment has been minimized.

Copy link
@mfenes

mfenes Jan 23, 2018

Author Contributor

I did see the naming inconsistency, but on the other hand code coverage measurement belongs to testing, and everything related to testing is placed under build/test. Not all the tools have their own subdirectory under the build directory (like javacc, releaseaudit, owasp), e.g. JUnit does not have. If JUnit does not have its own subdirectory under build/, then why should OpenClover have. If the reason to put OpenClover under an own build/coverage directory instead of putting it into build/test/lib is packaging, i.e. not delivering the clover jar in releases, then basically the answer is that a ZK compiled with Clover should not be released. I also verified that ant tar does not include build/test/lib jars. If ant targets tar, jar, compile, test-core-java etc. are run without the -Drun.clover=true parameter, then the clover jar is not even retrieved by ivy, so it won't be included, everything will run as before. Another reason is, that originally in current code everything related to Clover (db, reports) is configured to be under build/test/clover. If Clover db and reports are under build/test/clover, then why should the clover jar be put in build/coverage/lib and not in build/test/lib? All-in-all, these were the reasons behind my decision to put Clover under build/test/lib instead of build/coverage/lib. However, I agree that this is a naming inconsistency and I can see the reason that everything which has its own ivy configuration should have its own directory under build, so I can change the location of Clover if you prefer having Clover under build/coverage/lib.

This comment has been minimized.

Copy link
@afine

afine Jan 23, 2018

Contributor

My concern here is around classpath issues. Ideally I would like to make sure that clover and its dependencies (my understanding is that there are none currently but this could change) are only included when we are instrumenting coverage. The given setup may see us including clover in the test classpath even when not intended. For example, a developer wants to run the tests with clover and then immediately after without. If my understanding is correct, it there is no clean before those two executions clover will be included in the classpath of the second.

This comment has been minimized.

Copy link
@mfenes

mfenes Jan 24, 2018

Author Contributor

Ok. So would changing the location of Clover to ${build.dir}/clover/lib solve this problem?

  • Are you ok with the following directory structure:
    build/clover/db for Clover database,
    build/clover/jar for Clover jar,
    build/clover/reports for Clover reports, and
    clover.home=${build.dir}/clover

  • Should I change property name "ivy.coverage.lib" to "ivy.clover.lib"?

build.xml Outdated
</and>
</condition>
<!-- clover property set -->
<property name="clover.home" location="${test.java.build.dir}"/>

This comment has been minimized.

Copy link
@phunt

phunt Jan 22, 2018

Contributor

Similar as comment above - can't we contain this all in it's own subdir?

This comment has been minimized.

Copy link
@mfenes

mfenes Jan 23, 2018

Author Contributor

The main reason why I set clover.home to ${test.java.build.dir} is because originally in master, 3.5 and 3.4 Clover db is set to ${test.java.build.dir}/clover/db and Clover reports are set to ${test.java.build.dir}/clover/reports. This indicates that clover.home should be ${test.java.build.dir}. Since Clover was in use before this change, I thought it's better to keep the original settings as other tools (e.g. a Jenkins job) might rely on reports being generated under this location. @anmolnar also recommended to use this setting in his comment. Setting clover.home to ${test.java.build.dir} does not put everything related to Clover directly under build/test, as Clover db goes into build/test/clover/db, Clover reports go under build/test/clover/reports and clover jar is placed in /build/test/lib. Of course, I can change clover.home to point to any other location, e.g. to build/coverage, but one reason against it might be that Clover code coverage is more related to test than to build.

@phunt

This comment has been minimized.

Copy link
Contributor

phunt commented Jan 22, 2018

I did an "ant compile-test" and ended up with clover dependencies being pulled into build - clover dependencies should only be pulled when clover tasks are run.

Mark Fenes added 2 commits Jan 23, 2018
Fixed retrieving clover jar only when run.clover=true.
Mark Fenes
@mfenes

This comment has been minimized.

Copy link
Contributor Author

mfenes commented Jan 23, 2018

@phunt I've fixed "ant compile-test". Now clover dependencies are pulled into build only when run.clover=true. Thanks for noticing this.

build.xml Outdated
@@ -1406,50 +1410,53 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">

<target name="test-core" depends="test-core-java, test-core-cppunit"/>

<target name="test-coverage-java">

This comment has been minimized.

Copy link
@phunt

phunt Jan 23, 2018

Contributor

Why do we need this given we have a "clover" target?

I'm also hesitant to explicitly code that "coverage" == clover. In the past we've allowed coverage other than clover to be used.

perhaps "test-coverage-clover-java" instead?

This comment has been minimized.

Copy link
@mfenes

mfenes Jan 24, 2018

Author Contributor

Because the "clover" target does not generate the HTML and XML reports.
It's used to initialise and setup Clover and it's called as a dependency of "compile" to instrument source code.

I think declaring a "test-coverage-java" target to run Clover does not mean "coverage" == clover. The fact that it currently calls "test-core-java" and "generate-clover-reports" does not mean that we would not allow anybody to add/use other code coverage tools here.

The reason behind the naming was that I'm also planning to add C code coverage tests, and following the already existing ant target names "test-core-java" and "test-core-cppunit" as naming patterns, there could be targets "test-coverage-java" and "test-coverage-cppunit" to generate coverage reports for Java and C, respectively.

Their parent target could be "test-coverage", which would run "test-coverage-java" and "test-coverage-cppunit" to prepare a complete coverage report for both Java and C.

Then running a full coverage report for ZK would be as simple as running "test-coverage".
Please let me know what you think.

This comment has been minimized.

Copy link
@mfenes

mfenes Jan 24, 2018

Author Contributor

@phunt Actually, if you prefer, I could rename both the ivy configuration and the ant target for clover to "test-coverage-clover-java" as this does not exclude the possibility of including it into a test-coverage-java target later.

This comment has been minimized.

Copy link
@phunt

phunt Jan 24, 2018

Contributor

"I think declaring a "test-coverage-java" target to run Clover does not mean "coverage" == clover. The fact that it currently calls "test-core-java" and "generate-clover-reports" does not mean that we would not allow anybody to add/use other code coverage tools here."

Notice how we have cobertura down below in the build.xml file. This is what I mean. "test-coverage-java" just calls clover. If we had created a "test-coverage-java" in the past that called cobertura it seems like that's a statement. It's not a big deal, but hopefully you see what I mean.

Renaming to be more clover specific seems reasonable to me.

Copy link
Contributor

afine left a comment

Is it possible to exclude test related classes from the coverage report?

@@ -23,6 +23,48 @@ xmlns:artifact="antlib:org.apache.maven.artifact.ant"
xmlns:maven="antlib:org.apache.maven.artifact.ant"
xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">

<!-- ====================================================== -->

This comment has been minimized.

Copy link
@afine

afine Jan 23, 2018

Contributor

why was this stuff moved?

This comment has been minimized.

Copy link
@mfenes

mfenes Jan 24, 2018

Author Contributor

@afine
Because I need
<property name="clover.version" value="4.2.1" />
in
<property name="clover.jar" location="${clover.home}/lib/clover-${clover.version}.jar"/>
and the dependency versions at their original location were declared later than clover.jar, so clover.version was undefined at this point.

I had 3 choices:

  1. move the clover property set behind the dependency version declarations just before the macro definitions, separating it from the other property set declarations,
  2. move all the dependency version declarations before the clover property set,
  3. or just declare the clover.version separately from the other dependency versions in the clover property set block.

I've chosen option 2 as I thought that was the best out of the three.
Please let me know if there is a better way to solve this.

build.xml Outdated
<target name="clover" depends="clover.setup, clover.info"
description="Instrument the Unit tests using Clover. Requires a Clover license and CLOVER_HOME environment variable set appropriately. To use, specify -Drun.clover=true on the command line."/>
<target name="clover" if="run.clover" depends="ivy-retrieve-test-coverage-java, clover.check, clover.setup"
description="Instrument the Unit tests using Clover. To use, specify -Drun.clover=true on the command line."/>

This comment has been minimized.

Copy link
@afine

afine Jan 23, 2018

Contributor

we should update this description to show that we have an ant task that can be used instead of specifying a system property

build.xml Outdated
@@ -124,6 +160,7 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<property name="ivy.javacc.lib" value="${build.dir}/javacc/lib"/>
<property name="ivy.releaseaudit.lib" value="${build.dir}/releaseaudit/lib"/>
<property name="ivy.owasp.lib" value="${build.dir}/owasp/lib"/>
<property name="ivy.coverage.lib" value="${test.java.build.dir}/lib"/>

This comment has been minimized.

Copy link
@afine

afine Jan 23, 2018

Contributor

My concern here is around classpath issues. Ideally I would like to make sure that clover and its dependencies (my understanding is that there are none currently but this could change) are only included when we are instrumenting coverage. The given setup may see us including clover in the test classpath even when not intended. For example, a developer wants to run the tests with clover and then immediately after without. If my understanding is correct, it there is no clean before those two executions clover will be included in the classpath of the second.

Mark Fenes added 2 commits Jan 29, 2018
Moved Clover (db, lib, reports) to ${build.dir}/clover. Included test sources with <testsources> in clover-setup.
Changed naming to follow other tools and updated/added ant target descriptions.
Mark Fenes
@mfenes

This comment has been minimized.

Copy link
Contributor Author

mfenes commented Jan 30, 2018

@phunt @afine I've made the following changes: moved Clover (db, lib, reports) to ${build.dir}/clover. Included test sources with <testsources> in clover-setup.
Changed naming to follow other tools and updated/added ant target descriptions.

Copy link
Contributor

anmolnar left a comment

+1 lgtm

Clover jar is added to the compile and test classpath only if run.clover is set.
Added utility targets to print the compile and test classpath.
Copy link
Contributor

afine left a comment

I was testing this patch and noticed the following when Clover was instrumenting the classes:

compile:
    [javac] Compiling 255 source files to /Users/abefine/cloudera_code/zookeeper/build/classes
   [clover] OpenClover Version 4.2.1, built on November 21 2017 (build-1004)
   [clover] Loaded from: /Users/abefine/cloudera_code/zookeeper/build/clover/lib/clover-4.2.1.jar
   [clover] Clover free edition.
   [clover] Updating existing database at '/Users/abefine/cloudera_code/zookeeper/build/clover/db/zookeeper-coverage.db'.
   [clover] Processing files at 1.7 source level.
   [clover] Clover all over. Instrumented 255 files (16 packages).
   [clover] Elapsed time = 2.773 secs. (91.958 files/sec, 19,349.441 srclines/sec)
    [javac] /var/folders/xr/c9snm3bn66q0v2ht0rhlvh7w0000gp/T/clover6811972455999564511.tmp/org/apache/zookeeper/server/persistence/FileSnap.java:85: warning: [try] auto-closeable resource __CLR$ACI0 is never referenced in body of corresponding try statement
    [javac]             class __CLR4_2_1$AC0 implements java.lang.AutoCloseable {public void close(){}}; __CLR4_2_196j96jjdqh8amw.R.inc(11914);try (__CLR4_2_1$AC0 __CLR$ACI0=new __CLR4_2_1$AC0(){{__CLR4_2_196j96jjdqh8amw.R.inc(11915);}};InputStream snapIS = new BufferedInputStream(new FileInputStream(snap));
    [javac]                                                                                                                                                        ^
    [javac] /var/folders/xr/c9snm3bn66q0v2ht0rhlvh7w0000gp/T/clover6811972455999564511.tmp/org/apache/zookeeper/server/persistence/FileSnap.java:86: warning: [try] auto-closeable resource __CLR$ACI1 is never referenced in body of corresponding try statement
    [javac]                  __CLR4_2_1$AC0 __CLR$ACI1=new __CLR4_2_1$AC0(){{__CLR4_2_196j96jjdqh8amw.R.inc(11916);}};CheckedInputStream crcIn = new CheckedInputStream(snapIS, new Adler32())) {
    [javac]                                 ^
    [javac] /var/folders/xr/c9snm3bn66q0v2ht0rhlvh7w0000gp/T/clover6811972455999564511.tmp/org/apache/zookeeper/server/persistence/FileSnap.java:224: warning: [try] auto-closeable resource __CLR$ACI2 is never referenced in body of corresponding try statement
    [javac]             class __CLR4_2_1$AC1 implements java.lang.AutoCloseable {public void close(){}}; __CLR4_2_196j96jjdqh8amw.R.inc(11992);try (__CLR4_2_1$AC1 __CLR$ACI2=new __CLR4_2_1$AC1(){{__CLR4_2_196j96jjdqh8amw.R.inc(11993);}};CheckedOutputStream crcOut =
    [javac]                                                                                                                                                        ^
    [javac] /var/folders/xr/c9snm3bn66q0v2ht0rhlvh7w0000gp/T/clover6811972455999564511.tmp/org/apache/zookeeper/server/persistence/Util.java:164: warning: [try] auto-closeable resource __CLR$ACI0 is never referenced in body of corresponding try statement
    [javac]         }class __CLR4_2_1$AC0 implements java.lang.AutoCloseable {public void close(){}}; __CLR4_2_1digdigjdqh8b2y.R.inc(17547);try (__CLR4_2_1$AC0 __CLR$ACI0=new __CLR4_2_1$AC0(){{__CLR4_2_1digdigjdqh8b2y.R.inc(17548);}};RandomAccessFile raf = new RandomAccessFile(f, "r")) {
    [javac]                                                                                                                                                     ^
    [javac] 4 warnings

Any idea what could be causing this issue? Do we care?

Otherwise +1

build.xml Outdated
@@ -1861,4 +1876,18 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
<delete dir="${build.dir.eclipse}" />
</target>

<target name="print_compile_classpath">

This comment has been minimized.

Copy link
@afine

afine Feb 16, 2018

Contributor

As we discussed offline please move these useful targets to a new JIRA.

Removed the classpath printing from this PR.
@anmolnar

This comment has been minimized.

Copy link
Contributor

anmolnar commented Mar 28, 2018

@afine do you still need explanation for the above error to commit this?

@anmolnar

This comment has been minimized.

Copy link
Contributor

anmolnar commented Apr 19, 2018

@phunt @afine Just tested this patch and it works fine. I think it's ready to be merged.

@asfgit asfgit closed this in 79627c6 Apr 25, 2018
@phunt

This comment has been minimized.

Copy link
Contributor

phunt commented Apr 25, 2018

+1, lgtm. I've committed this to master. Thanks @mfenes !

nkalmar added a commit to nkalmar/zookeeper that referenced this pull request May 11, 2018
ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Author: Mark Fenes <mfenes@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#443 from mfenes/ZOOKEEPER-2955 and squashes the following commits:

321fc01 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
ca68181 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
4cd1a31 [Mark Fenes] Trigger notification
09872a6 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
3e0f254 [Mark Fenes] Trigger notification
0cdb444 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
270c12e [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
f59dcf8 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report

Change-Id: I089ca39224fa6012a299a46e4a35333ecc87ef35
nkalmar added a commit to nkalmar/zookeeper that referenced this pull request May 11, 2018
ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Author: Mark Fenes <mfenes@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#443 from mfenes/ZOOKEEPER-2955 and squashes the following commits:

321fc01 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
ca68181 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
4cd1a31 [Mark Fenes] Trigger notification
09872a6 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
3e0f254 [Mark Fenes] Trigger notification
0cdb444 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
270c12e [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
f59dcf8 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report

Change-Id: I089ca39224fa6012a299a46e4a35333ecc87ef35
nkalmar added a commit to nkalmar/zookeeper that referenced this pull request May 11, 2018
ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Author: Mark Fenes <mfenes@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#443 from mfenes/ZOOKEEPER-2955 and squashes the following commits:

321fc01 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
ca68181 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
4cd1a31 [Mark Fenes] Trigger notification
09872a6 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
3e0f254 [Mark Fenes] Trigger notification
0cdb444 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
270c12e [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
f59dcf8 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report

Change-Id: I089ca39224fa6012a299a46e4a35333ecc87ef35
nkalmar added a commit to nkalmar/zookeeper that referenced this pull request May 11, 2018
ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Author: Mark Fenes <mfenes@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#443 from mfenes/ZOOKEEPER-2955 and squashes the following commits:

321fc01 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
ca68181 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
4cd1a31 [Mark Fenes] Trigger notification
09872a6 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
3e0f254 [Mark Fenes] Trigger notification
0cdb444 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
270c12e [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
f59dcf8 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report

Change-Id: I089ca39224fa6012a299a46e4a35333ecc87ef35
nkalmar added a commit to nkalmar/zookeeper that referenced this pull request May 11, 2018
ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Author: Mark Fenes <mfenes@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#443 from mfenes/ZOOKEEPER-2955 and squashes the following commits:

321fc01 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
ca68181 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
4cd1a31 [Mark Fenes] Trigger notification
09872a6 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
3e0f254 [Mark Fenes] Trigger notification
0cdb444 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
270c12e [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
f59dcf8 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report

Change-Id: I089ca39224fa6012a299a46e4a35333ecc87ef35
nkalmar added a commit to nkalmar/zookeeper that referenced this pull request May 11, 2018
ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Author: Mark Fenes <mfenes@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#443 from mfenes/ZOOKEEPER-2955 and squashes the following commits:

321fc01 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
ca68181 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
4cd1a31 [Mark Fenes] Trigger notification
09872a6 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
3e0f254 [Mark Fenes] Trigger notification
0cdb444 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
270c12e [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
f59dcf8 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report

Change-Id: I089ca39224fa6012a299a46e4a35333ecc87ef35
asfgit pushed a commit that referenced this pull request May 20, 2018
ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Author: Mark Fenes <mfenescloudera.com>

Reviewers: phuntapache.org

Closes #443 from mfenes/ZOOKEEPER-2955 and squashes the following commits:

321fc01 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
ca68181 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
4cd1a31 [Mark Fenes] Trigger notification
09872a6 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
3e0f254 [Mark Fenes] Trigger notification
0cdb444 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
270c12e [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
f59dcf8 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report

Change-Id: I089ca39224fa6012a299a46e4a35333ecc87ef35

Author: Mark Fenes <mfenes@cloudera.com>

Reviewers: phunt@apache.org

Closes #519 from nkalmar/branch-3.5
lvfangmin pushed a commit to lvfangmin/zookeeper that referenced this pull request Jun 17, 2018
ZOOKEEPER-2955: Enable Clover code coverage report

This PR configures OpenClover to generate Java code coverage reports.

To generate Java code coverage report run:
ant test-coverage-clover-java

For quick testing of this PR run:
ant -Dtestcase=test_file_name test-coverage-clover-java

Clover can also be run step-by-step:
ant -Drun.clover=true test-core-java
ant clover-report

Note: run.clover must not be set when building ZK for production use.

The reports will be placed under the build/test/clover/reports directory in HTML and XML formats.

Author: Mark Fenes <mfenes@cloudera.com>

Reviewers: phunt@apache.org

Closes apache#443 from mfenes/ZOOKEEPER-2955 and squashes the following commits:

321fc01 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
ca68181 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
4cd1a31 [Mark Fenes] Trigger notification
09872a6 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
3e0f254 [Mark Fenes] Trigger notification
0cdb444 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
270c12e [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report
f59dcf8 [Mark Fenes] ZOOKEEPER-2955: Enable Clover code coverage report

Change-Id: I089ca39224fa6012a299a46e4a35333ecc87ef35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.