Permalink
Browse files

Make it possible to get JUnit XML output from the rest run

  • Loading branch information...
olabini committed Apr 19, 2011
1 parent 3c9eed1 commit e75d0a2b9bb8f231878b5c92d9203478b0be6af6
Showing with 22 additions and 26 deletions.
  1. +20 −26 build.xml
  2. +2 −0 default.build.properties
View
@@ -21,20 +21,12 @@
<exclude name="**/*Mojo.java"/>
</patternset>
-<!--
- <path id="emma.lib" >
- <pathelement location="emma.jar" />
- <pathelement location="emma_ant.jar" />
- </path>
-
- <taskdef resource="emma_ant.properties" classpathref="emma.lib" />
--->
-
<target name="prepare" description="Creates the directories needed for building">
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes.dir}"/>
-<!-- <mkdir dir="build/coverage"/> -->
<mkdir dir="${classes.test.dir}"/>
+ <mkdir dir="${test.results.dir}"/>
+ <mkdir dir="${html.test.results.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
@@ -72,22 +64,6 @@
<jtestr port="20333" logging="DEBUG" outputLevel="VERBOSE" groups="Unit Spec"/>
</target>
-<!--
- <target name="test-coverage" depends="compile" description="Runs all tests">
- <emmajava libclasspathref="emma.lib" fullmetadata="yes" sourcepath="${src.dir}" classname="org.jtestr.JtestRRunner">
- <classpath refid="build.classpath"/>
- <classpath path="build/classes"/>
- <classpath path="${src.ruby.dir}"/>
-
- <filter includes="org.jtestr.*"/>
-
- <txt outfile="build/coverage/coverage.txt" />
- <xml outfile="build/coverage/coverage.xml" />
- <html outfile="build/coverage/coverage.html" />
- </emmajava>
- </target>
--->
-
<target name="smoke" depends="compile" description="Runs all tests">
<taskdef name="jtestr" classname="org.jtestr.ant.JtestRAntRunner">
<classpath refid="build.classpath"/>
@@ -121,6 +97,24 @@
</junit>
</target>
+ <target name="ci-test" depends="compile" description="Runs all tests">
+ <junit failureproperty="junit.failure" fork="yes">
+ <classpath refid="build.classpath"/>
+ <classpath path="${classes.dir}"/>
+ <classpath path="${src.ruby.dir}"/>
+
+ <formatter type="brief" usefile="false" />
+ <formatter type="xml"/>
+
+ <test name="org.jtestr.ant.JtestRSuite" todir="${test.results.dir}"/>
+ </junit>
+ <junitreport todir="${test.results.dir}" tofile="../TESTS-TestSuites.xml">
+ <fileset dir="${test.results.dir}" includes="TEST-*.xml"/>
+ <report format="frames" todir="${html.test.results.dir}"/>
+ </junitreport>
+ <fail if="junit.failure" message="Test(s) failed."/>
+ </target>
+
<target name="jar" depends="test" description="Create the distribution file">
<jar destfile="${dist.dir}/jtestr.jar" filesonly="false">
<fileset dir="${classes.dir}">
View
@@ -9,4 +9,6 @@ dist.dir=dist
build.dir=build
classes.dir=${build.dir}/classes
classes.test.dir=${build.dir}/test_classes
+test.results.dir=${build.dir}/test-results
+html.test.results.dir=${test.results.dir}/html
javac.version=1.5

0 comments on commit e75d0a2

Please sign in to comment.