Skip to content

Commit 48f654d

Browse files
trnljyemin
authored andcommitted
Added test-artifact-compile and renamed testing task
1 parent cf87748 commit 48f654d

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

build.xml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ limitations under the License.
6060
<pathelement path="${build.main.dir}" />
6161
<pathelement path="${build.test.dir}" />
6262
</path>
63+
<path id="artifact.classpath">
64+
<pathelement path="${build.test.dir}" />
65+
<pathelement location="lib/testng-6.3.1.jar"/>
66+
<pathelement location="${artifact.name}"/>
67+
</path>
6368

6469
<!-- ******************************************************************* -->
6570
<!-- Tasks definition -->
@@ -295,13 +300,27 @@ limitations under the License.
295300
</testng>
296301
</target>
297302

298-
<target name="test-with-artifact" depends="test-compile">
303+
<target name="test-artifact-compile">
304+
<property name="myclasspath" refid="artifact.classpath"/>
305+
<!-- Emit the property to the ant console -->
306+
<echo message="Classpath = ${myclasspath}"/>
299307

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>
308+
<javac
309+
srcdir="src/test"
310+
destdir="${build.test.dir}"
311+
optimize="off"
312+
deprecation="off"
313+
source="${build.conf.javac.source}"
314+
encoding="ISO-8859-1"
315+
fork="true"
316+
debug="on"
317+
includeantruntime="false">
318+
<classpath refid="artifact.classpath"/>
319+
<compilerarg value="-Xlint:all,-rawtypes"/>
320+
</javac>
321+
</target>
322+
323+
<target name="test-artifact" depends="test-artifact-compile">
305324

306325
<testng classpathref="artifact.classpath" outputdir="${test.dir}" listeners="com.mongodb.util.TestNGListener" haltonfailure="false" verbose="1" >
307326
<jvmarg value="-Xmx512M" />

0 commit comments

Comments
 (0)