Any help would be appreciated, I am trying to exclude my Test classes from having the probes for obvious reasons. The grobo-instrument tasks appears to be ignoring me though. The task in question in my build script is attached below.
right before the <grobo-instrument> task to see if it copies over the expected files into the "tmp" directory.
Also, make sure that the ${coverage.dir}/classes directory is empty before running this task. If you ran it once before with the tests included, then once again with them omitted, you'll find the test classes still there, but with an older time stamp.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
Any help would be appreciated, I am trying to exclude my Test classes from having the probes for obvious reasons. The grobo-instrument tasks appears to be ignoring me though. The task in question in my build script is attached below.
thx
<!-- ===================================================================== -->
<!-- Coverage probes -->
<!-- ===================================================================== -->
<target name="coverage-probes" description="Add code coverage probes" depends="install.groboutils, compile">
<taskdef resource="ant-grobocoverage.properties"/>
<grobo-instrument logdir="${coverage.dir}/logs" logger="fast"
destdir="${coverage.dir}/classes">
<fileset dir="${build.dir}/${src.dir}">
<exclude name="**/*Test*.class" />
</fileset>
<measure type="linecount" />
<measure type="function" />
<measure type="bytecode" />
<measure type="branch" />
<measure type="call-pair" />
</grobo-instrument>
</target>
I've just reviewed the source code to the <grobo-instrument> task. It reuses the <fileset> logic that Ant uses.
As an experiment, you could try doing:
<mkdir dir="tmp" />
<copy todir="tmp">
<fileset dir="${build.dir}/${src.dir}">
<exclude name="**/*Test*.class" />
</fileset>
</copy>
right before the <grobo-instrument> task to see if it copies over the expected files into the "tmp" directory.
Also, make sure that the ${coverage.dir}/classes directory is empty before running this task. If you ran it once before with the tests included, then once again with them omitted, you'll find the test classes still there, but with an older time stamp.