1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-17 04:32:04 +01:00

SMACK-392 Updated test targets in ant build. Fix integration tests and added target for unit tests.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13371 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
rcollier 2012-11-22 02:05:04 +00:00
parent fc3ec2ab8a
commit 012e1252e2
3 changed files with 62 additions and 6 deletions

View file

@ -56,6 +56,7 @@
<property name="javadoc.dest.dir" value="${basedir}/target/javadoc" /> <property name="javadoc.dest.dir" value="${basedir}/target/javadoc" />
<property name="merge.lib.dir" value="${basedir}/build/merge" /> <property name="merge.lib.dir" value="${basedir}/build/merge" />
<property name="test.dir" value="${basedir}/test" /> <property name="test.dir" value="${basedir}/test" />
<property name="test-unit.dir" value="${basedir}/test-unit" />
<property name="resources.dir" value="${basedir}/build/resources" /> <property name="resources.dir" value="${basedir}/build/resources" />
<property name="jingle.extension.merge.lib.dir" value="${basedir}/jingle/extension/build/merge" /> <property name="jingle.extension.merge.lib.dir" value="${basedir}/jingle/extension/build/merge" />
<property name="jingle.extension.lib.dir" value="${basedir}/jingle/extension/build/lib" /> <property name="jingle.extension.lib.dir" value="${basedir}/jingle/extension/build/lib" />
@ -144,14 +145,21 @@
source="1.6" source="1.6"
target="1.6" target="1.6"
> >
<src path="${basedir}/source" />
<src path="${test.dir}" /> <src path="${test.dir}" />
<src path="${test-unit.dir}" />
<classpath> <classpath>
<fileset dir="${merge.lib.dir}"> <fileset dir="${merge.lib.dir}">
<include name="*.jar"/> <include name="*.jar"/>
</fileset> </fileset>
<fileset dir="${basedir}/build"> <fileset dir="${basedir}/build">
<include name="junit.jar"/> <include name="junit-4.10.jar"/>
<include name="mockito-all-1.8.2.jar"/>
<include name="powermock-mockito-1.3.5-full.jar"/>
</fileset>
<fileset dir ="${basedir}/build/build">
<include name="xmlunit.jar"/> <include name="xmlunit.jar"/>
<include name="java-xmlbuilder-0.3.jar" />
</fileset> </fileset>
<pathelement location="${compile.dir}" /> <pathelement location="${compile.dir}" />
</classpath> </classpath>
@ -311,12 +319,18 @@
<sysproperty key="smack.debug" value="${test.smack.debug}" /> <sysproperty key="smack.debug" value="${test.smack.debug}" />
<classpath> <classpath>
<fileset dir="${basedir}/build/build">
<include name="xmlunit.jar"/>
</fileset>
<fileset dir="${merge.lib.dir}"> <fileset dir="${merge.lib.dir}">
<include name="*.jar"/> <include name="*.jar"/>
</fileset> </fileset>
<fileset dir="${basedir}/build">
<include name="junit-4.10.jar"/>
<include name="mockito-all-1.8.2.jar"/>
<include name="powermock-mockito-1.3.5-full.jar"/>
</fileset>
<fileset dir ="${basedir}/build/build">
<include name="xmlunit.jar"/>
<include name="java-xmlbuilder-0.3.jar" />
</fileset>
<fileset dir="${jar.dest.dir}"> <fileset dir="${jar.dest.dir}">
<include name="smack-test.jar"/> <include name="smack-test.jar"/>
</fileset> </fileset>
@ -337,6 +351,48 @@
<fail if="tests.failed" message="** Tests failed, see test log. **" /> <fail if="tests.failed" message="** Tests failed, see test log. **" />
</target> </target>
<!-- test-unit -->
<!-- ======================================================================================= -->
<target name="test-unit" depends="compile, jar-test" unless="no.test">
<junit printsummary="on"
fork="true"
haltonfailure="false"
failureproperty="tests.failed"
showoutput="true">
<classpath>
<fileset dir="${merge.lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}/build">
<include name="junit-4.10.jar"/>
<include name="mockito-all-1.8.2.jar"/>
<include name="powermock-mockito-1.3.5-full.jar"/>
</fileset>
<fileset dir ="${basedir}/build/build">
<include name="xmlunit.jar"/>
<include name="java-xmlbuilder-0.3.jar" />
</fileset>
<fileset dir="${jar.dest.dir}">
<include name="smack-test.jar"/>
</fileset>
<pathelement location="${compile.dir}" />
<pathelement location="${test-unit.dir}" />
<pathelement location="${resources.dir}" />
</classpath>
<formatter type="brief" usefile="false"/>
<batchtest>
<fileset dir="${basedir}/test-unit">
<patternset refid="test.cases" />
</fileset>
</batchtest>
</junit>
<fail if="tests.failed" message="** Tests failed, see test log. **" />
</target>
<!-- test --> <!-- test -->
<!-- ======================================================================================= --> <!-- ======================================================================================= -->

BIN
build/junit-4.10.jar Normal file

Binary file not shown.

Binary file not shown.