<div dir="ltr">Hi all,<div><br></div><div>John Oliver and Mani Sarkar spent some time on the most recent Adopt OpenJDK hackday and managed to get what looks like to be meaningful code coverage numbers for OpenJDK using the jcov/jtreg tools:</div><div><br></div><div>Results for jdk9: <a href="http://sticky.uwcs.co.uk/jcov/" target="_blank">http://sticky.uwcs.co.uk/jcov/</a><br></div><div><br></div><div>========Code Tools Dev========</div><div><br></div><div>The configuration John used was as follows (is this the correct usage pattern?):</div><div><br></div><div>Build jdk images<br>
install jtreg with the jcov<br>
<br>
export the normal vars:<br>
<br>
```<br>
export SOURCE_CODE=/home/joliver/<u></u>workspace/jdk9/<br>
export JTREG_INSTALL=/home/joliver/<u></u>workspace/jtreg<br>
export JT_HOME=$JTREG_INSTALL<br>
export JTREG_HOME=$JTREG_INSTALL<br>
export PRODUCT_HOME=$SOURCE_CODE/<u></u>build/linux-x86_64-normal-<u></u>server-release/images/jdk <br>
export JPRT_JTREG_HOME=${JT_HOME}<br>
export JPRT_JAVA_HOME=${PRODUCT_HOME}<br>
export JTREG_TIMEOUT_FACTOR=5<br>
export CONCURRENCY=8<br>
```<br><br>
cd into jdk/test<br>
<br>
edit the Makefile and add the following:<br>
<br>
```<br>
jdkroot=/home/joliver/<u></u>workspace/jdk9/<br>
<br>
JTREG_TEST_OPTIONS += -jcov/classes:$(jdkroot)/<u></u>build/linux-x86_64-normal-<u></u>server-release/jdk/modules/<u></u>java.base<br>
JTREG_TEST_OPTIONS += -jcov/source:$(jdkroot)/jdk/<u></u>src/java.base/share/classes<br>
JTREG_TEST_OPTIONS += -jcov/include:*<br>
```<br>
<br>
just before the line: # Make sure jtreg exists<br>
<br>
then just run "make test" inside the root<br></div><div><br></div><div>=======Quality Discuss=======</div><div><br></div><div>Is this something that could be hosted by the quality group for the major OpenJDK code lines (7u, 8u and jdk9)?</div><div><br></div><div>If not then the Adoption Group can host it on one of their external servers temporarily and we could link to that from the wiki(s)/project page(s).</div><div><br clear="all"><div><div class="gmail_signature">Cheers,<br>Martijn</div></div>
</div></div>