Skip to content

Commit 9eacf18

Browse files
committed
Merge branch 'release-2.7.x' of github.com:mongodb/mongo-java-driver into release-2.7.x
2 parents f7f5000 + d5abeee commit 9eacf18

File tree

1 file changed

+42
-23
lines changed

1 file changed

+42
-23
lines changed

build.xml

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
-->
1818

1919
<project name="MongoDB Java Driver" default="compile" basedir=".">
20+
<property environment="env"/>
2021

2122
<property file="build.properties" prefix="build.conf"/>
2223

@@ -28,6 +29,8 @@ limitations under the License.
2829
<property name="testdir" location="${targetdir}/test"/>
2930
<dirname property="javabase" file="${java.home}"/>
3031

32+
<property name="clover.jar" location="${env.CLOVER_HOME}/lib/clover.jar"/>
33+
<taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
3134
<path id="classpath">
3235
<fileset dir="lib"><include name="**/*.jar"/></fileset>
3336
<pathelement path="conf" />
@@ -36,6 +39,15 @@ limitations under the License.
3639
<pathelement path="${javabase}/lib/tools.jar" />
3740
</path>
3841

42+
<path id="classpath.clover">
43+
<fileset dir="lib"><include name="**/*.jar"/></fileset>
44+
<pathelement path="conf" />
45+
<pathelement path="build/main" />
46+
<pathelement path="build/test" />
47+
<pathelement path="${javabase}/lib/tools.jar" />
48+
<pathelement path="${clover.jar}" />
49+
</path>
50+
3951
<!-- ******************************************************************* -->
4052
<!-- The init target. -->
4153
<!-- ******************************************************************* -->
@@ -235,17 +247,6 @@ limitations under the License.
235247
</testng>
236248
</target>
237249

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

250251
<target name="test-single" depends="compile">
251252
<condition property="propsSpecified">
@@ -312,26 +313,44 @@ limitations under the License.
312313
<!-- The reporting targets -->
313314
<!-- ******************************************************************* -->
314315

315-
<target name="junit-reports" depends="test">
316+
<target name="junit-reports" depends="compile">
317+
<testng classpathref="classpath" outputdir="${testdir}" listeners="com.mongodb.util.TestNGListener" haltonfailure="false" >
318+
<jvmarg value="-Xmx512M" />
319+
<xmlfileset dir="." includes="testng.xml"/>
320+
</testng>
316321
<junitreport todir="${testdir}">
317322
<fileset dir="${testdir}"><include name="*/*.xml"/></fileset>
318323
<report format="noframes" todir="${testdir}"/>
319324
</junitreport>
320325
</target>
321326

322-
<!-- NOTE: publish-local is now located in maven/ -->
323-
<taskdef resource="cloverlib.xml" classpath="lib/clover-3.1.0.jar"/>
324-
325-
<target name="-check.clover">
326-
<available property="clover.installed" classname="com.cenqua.clover.CloverInstr" />
327-
</target>
328-
327+
328+
329+
<target name="-check.clover">
330+
<available property="clover.installed" classname="com.cenqua.clover.CloverInstr" />
331+
</target>
332+
329333
<target name="with.clover" depends="guard.noclover">
330334
<clover-setup/>
331335
</target>
332-
333-
<target name="guard.noclover" depends="-check.clover" unless="clover.installed">
334-
<fail message="The target you are attempting to run requires Clover, which doesn't appear to be installed"/>
335-
</target>
336+
337+
<target name="guard.noclover" depends="-check.clover" unless="clover.installed">
338+
<fail message="The target you are attempting to run requires Clover, which doesn't appear to be installed"/>
339+
</target>
340+
341+
<target name="jenkins-test" depends="with.clover,compile">
342+
343+
<testng classpathref="classpath.clover" outputdir="${testdir}" listeners="com.mongodb.util.TestNGListener, com.cenqua.clover.tasks.testng.CloverOptimizedTestSelector" haltonfailure="false" verbose="1">
344+
<jvmarg value="-Xmx512M" />
345+
<xmlfileset dir="." includes="testng.xml"/>
346+
</testng>
347+
<clover-report>
348+
<current outfile="coverage.xml">
349+
<format type="xml"/>
350+
</current>
351+
</clover-report>
352+
</target>
353+
354+
<!-- NOTE: publish-local is now located in maven/ -->
336355

337356
</project>

0 commit comments

Comments
 (0)