easier uintegration of junit4 in build.xml

pull/6/head
Chris Conlon 2015-12-04 11:51:07 -07:00
parent c07215ab5a
commit 94a47045af
1 changed files with 12 additions and 4 deletions

View File

@ -22,7 +22,12 @@
<property name="examples.dir" value="examples/"/>
<property name="examples.build.dir" value="examples/build"/>
<property name="reports.dir" value="build/reports"/>
<property name="junit4" value="junit-4.11.jar" />
<!-- These paths should be relative to JUNIT_HOME -->
<property name="junit4" value="junit-4.12.jar" />
<property name="hamcrest-core" value="hamcrest-core-1.3.jar" />
<property name="ant-junit4" value="ant/ant-junit4.jar" />
<property environment="env"/>
<!-- classpath to compiled wolfssl.jar, for running tests -->
@ -32,7 +37,6 @@
</fileset>
<fileset dir="${env.JUNIT_HOME}">
<include name="${junit4}"/>
<include name="ant-junit4.jar"/>
</fileset>
</path>
@ -139,11 +143,15 @@
</target>
<target name="test" depends="build-test">
<junit printsummary="yes" showoutput="yes" haltonfailure="yes">
<junit printsummary="yes" showoutput="yes" haltonfailure="yes" fork="true">
<classpath>
<pathelement location="${build.dir}"/>
<pathelement location="${test.build.dir}"/>
<pathelement location="${java.class.path}"/>
<fileset dir="${env.JUNIT_HOME}">
<include name="${junit4}"/>
<include name="${hamcrest-core}"/>
<include name="${ant-junit4}"/>
</fileset>
</classpath>
<formatter type="plain"/>