summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--build.xml15
2 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e642806..b9c4d82 100644
--- a/Makefile
+++ b/Makefile
@@ -17,13 +17,13 @@ dist/lib/stroke.jar: third-party/jzlib/jzlib.jar third-party/icu4j.jar third-par
ant ${DEFINES}
FINDBUGS_VERSION=3.0.1
.PHONY : test
test: dist/lib/stroke.jar third-party/cobertura/cobertura.jar third-party/findbugs-$(FINDBUGS_VERSION)/lib/findbugs.jar third-party/pmd/lib/pmd-5.0.0.jar
- ant ${DEFINES} -DJUNIT_JAR=${JUNIT} -Dcobertura-jar=third-party/cobertura/cobertura.jar -Djakarta-oro-jar=third-party/cobertura/lib/jakarta-oro-2.0.8.jar -Dlog4j-jar=third-party/cobertura/lib/log4j-1.2.9.jar -Dasm-jar=third-party/cobertura/lib/asm-3.0.jar -Dasm-tree-jar=third-party/cobertura/lib/asm-tree-3.0.jar -Dicu4j-jar=third-party/icu4j.jar -Dfindbugs.home=third-party/findbugs-$(FINDBUGS_VERSION) -Dpmd.home=third-party/pmd test
+ ant ${DEFINES} -DJUNIT_JAR=${JUNIT} -DHAMCREST_JAR=${HAMCREST} -Dcobertura-jar=third-party/cobertura/cobertura.jar -Djakarta-oro-jar=third-party/cobertura/lib/jakarta-oro-2.0.8.jar -Dlog4j-jar=third-party/cobertura/lib/log4j-1.2.9.jar -Dasm-jar=third-party/cobertura/lib/asm-3.0.jar -Dasm-tree-jar=third-party/cobertura/lib/asm-tree-3.0.jar -Dicu4j-jar=third-party/icu4j.jar -Dfindbugs.home=third-party/findbugs-$(FINDBUGS_VERSION) -Dpmd.home=third-party/pmd test
third-party/aalto/aalto-xml.jar:
mkdir -p third-party/aalto
curl http://repo2.maven.org/maven2/com/fasterxml/aalto-xml/0.9.8/aalto-xml-0.9.8.jar -o third-party/aalto/aalto-xml.jar
third-party/stax2/stax2-api.jar:
diff --git a/build.xml b/build.xml
index fe123bb..00f098e 100644
--- a/build.xml
+++ b/build.xml
@@ -114,12 +114,13 @@
source="1.6"
target="1.6">
<compilerarg line="-encoding utf-8"/>
<classpath>
<pathelement location="${jar}"/>
<pathelement location="${JUNIT_JAR}"/>
+ <pathelement location="${HAMCREST_JAR}"/>
<fileset dir="${icu4j-dir}" includes="icu4j.jar"/>
</classpath>
</javac>
</target>
<target name="instrument" if="cobertura-jar" depends="compile-tests">
@@ -140,12 +141,13 @@
<classpath>
<pathelement location="${cobertura.dir}"/>
<path refid="cobertura.classpath"/>
</classpath>
<classpath>
<pathelement location="${JUNIT_JAR}"/>
+ <pathelement location="${HAMCREST_JAR}"/>
<pathelement location="${jar}"/>
<pathelement location="${src.tests}"/>
<path refid="classpath"/>
</classpath>
<batchtest todir="${test.results}">
<fileset dir="${src.tests}">
@@ -198,13 +200,13 @@
<fileset dir="${src}">
<include name="**/*.java"/>
</fileset>
</pmd>
</target>
- <target name="test" depends="compile-tests, instrument, run-tests, coverage, findbugs, pmd">
+ <target name="test" depends="compile-tests, instrument, run-tests, coverage, findbugs, pmd, report-junit-tests">
</target>
<target name="clean"
description="clean up" >
<delete dir="${build}"/>
<delete dir="${test.results}"/>
@@ -240,7 +242,18 @@
<classpath>
<path refid="classpath"/>
<path location="${jar}"/>
</classpath>
</java>
</target>
+
+ <target name="report-junit-tests" depends="run-tests">
+ <mkdir dir="${test.results}/html"/>
+ <junitreport todir="${test.results}">
+ <fileset dir="${test.results}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report todir="${test.results}/html"/>
+ </junitreport>
+ </target>
+
</project>