opencv/modules/java/java_test/build.xml
2012-12-19 14:28:59 -08:00

70 lines
1.9 KiB
XML

<project>
<path id="master-classpath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
<fileset dir="bin">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="build"/>
<delete dir="testResults"/>
</target>
<target name="compile">
<mkdir dir="build/classes"/>
<javac sourcepath="" srcdir="src" destdir="build/classes" >
<include name="**/*.java"/>
<classpath refid="master-classpath"/>
</javac>
</target>
<target name="jar">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/opencv-test.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="org.opencv.test.OpenCVTestRunner"/>
</manifest>
</jar>
</target>
<!-- <target name="run" > -->
<!-- <java fork="true" classname="org.opencv.test.OpenCVTestRunner"> -->
<!-- <sysproperty key="java.library.path" path="${javaLibraryPath}"/> -->
<!-- <classpath refid="master-classpath"/> -->
<!-- <classpath> -->
<!-- <fileset dir="build/jar"> -->
<!-- <include name="*.jar"/> -->
<!-- </fileset> -->
<!-- </classpath> -->
<!-- </java> -->
<!-- </target> -->
<target name="test">
<mkdir dir="testResults"/>
<junit printsummary="yes" haltonfailure="false">
<sysproperty key="java.library.path" path="${javaLibraryPath}"/>
<classpath refid="master-classpath"/>
<classpath>
<pathelement location="build/classes"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="testResults">
<zipfileset src="build/jar/opencv-test.jar" includes="**/*.class" excludes="**/OpenCVTest*">
<exclude name="**/*$*.class"/>
</zipfileset>
</batchtest>
</junit>
</target>
<target name="buildAndTest">
<antcall target="compile"/>
<antcall target="jar"/>
<antcall target="test"/>
</target>
</project>