Skip to content

Commit 66e8c99

Browse files
committed
Adding 'test-with-artifact' target
1 parent c2a691f commit 66e8c99

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

build.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ limitations under the License.
3131
<property name="build.instrumented.dir" location="${build.dir}/instrumented"/>
3232
<property name="build.logs.dir" location="${basedir}/logs"/>
3333
<property name="build.docs.dir" location="${basedir}/docs"/>
34+
<property name="artifact.name" value="mongo.jar"/>
3435
<property name="target.dir" location="${basedir}/target"/>
3536
<property name="test.dir" location="${target.dir}/test"/>
3637
<property name="test.classes" value="*"/>
@@ -294,6 +295,22 @@ limitations under the License.
294295
</testng>
295296
</target>
296297

298+
<target name="test-with-artifact" depends="test-compile">
299+
300+
<path id="artifact.classpath">
301+
<pathelement path="${build.test.dir}" />
302+
<pathelement location="lib/testng-6.3.1.jar"/>
303+
<pathelement location="${artifact.name}"/>
304+
</path>
305+
306+
<testng classpathref="artifact.classpath" outputdir="${test.dir}" listeners="com.mongodb.util.TestNGListener" haltonfailure="false" verbose="1" >
307+
<jvmarg value="-Xmx512M" />
308+
<jvmarg value="-ea" />
309+
<jvmarg value="-Dcom.mongodb.slaveAcceptableLatencyMS=${test.com.mongodb.slaveAcceptableLatencyMS}"/>
310+
<classfileset dir="${build.test.dir}" includes="**/${test.classes}.class" />
311+
</testng>
312+
</target>
313+
297314
<!-- ******************************************************************* -->
298315
<!-- The coverage targets -->
299316
<!-- ******************************************************************* -->

0 commit comments

Comments
 (0)