Skip to content

Commit 81b6dd1

Browse files
author
Brendan W. McAdams
committed
Finished fixing coverage reporting so it doesn't break for those w/o libs
1 parent c8ea836 commit 81b6dd1

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

build.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,17 @@ limitations under the License.
235235
</testng>
236236
</target>
237237

238-
<target name="bamboo-test" depends="compile">
238+
<target name="bamboo-test" depends="compile,guard.noclover">
239239
<clover-setup/>
240240
<testng classpathref="classpath" outputdir="${testdir}" listeners="com.mongodb.util.TestNGListener, com.cenqua.clover.tasks.testng.CloverOptimizedTestSelector" haltonfailure="false" >
241241
<jvmarg value="-Xmx512M" />
242242
<xmlfileset dir="." includes="testng.xml"/>
243-
</testng>
243+
</testng>
244+
<clover-report>
245+
<current outfile="coverage.xml">
246+
<format type="xml"/>
247+
</current>
248+
</clover-report>
244249
</target>
245250

246251
<target name="test-single" depends="compile">
@@ -316,5 +321,14 @@ limitations under the License.
316321
</target>
317322

318323
<!-- NOTE: publish-local is now located in maven/ -->
324+
<taskdef resource="cloverlib.xml" classpath="lib/clover-3.1.0.jar"/>
325+
326+
<target name="-check.clover">
327+
<available property="clover.installed" classname="com.cenqua.clover.CloverInstr" />
328+
</target>
329+
330+
<target name="guard.noclover" depends="-check.clover" unless="clover.installed">
331+
<fail message="The target you are attempting to run requires Clover, which doesn't appear to be installed"/>
332+
</target>
319333

320334
</project>

0 commit comments

Comments
 (0)