opencv/modules/java/test/pure_test/build.xml

71 lines
2.1 KiB
XML
Raw Normal View History

2017-12-29 12:15:30 +08:00
<project name="OpenCV-Test">
2016-12-06 22:42:00 +08:00
<property environment="env"/>
<property file="ant-${opencv.build.type}.properties"/>
<property name="test.dir" value="testResults"/>
<property name="build.dir" value="build"/>
2012-12-20 06:28:59 +08:00
<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="${test.dir}"/>
2012-12-20 06:28:59 +08:00
</target>
<target name="compile">
<mkdir dir="build/classes"/>
<javac sourcepath="" srcdir="src" destdir="build/classes" includeantruntime="false" >
2012-12-20 06:28:59 +08:00
<include name="**/*.java"/>
<classpath refid="master-classpath"/>
</javac>
</target>
2017-12-29 12:15:30 +08:00
<target name="jar" depends="compile">
2012-12-20 06:28:59 +08:00
<mkdir dir="build/jar"/>
<jar destfile="build/jar/opencv-test.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="org.opencv.test.OpenCVTestRunner"/>
2012-12-20 06:28:59 +08:00
</manifest>
</jar>
</target>
2017-12-29 12:15:30 +08:00
<target name="test" depends="jar">
<mkdir dir="${test.dir}"/>
<junit printsummary="true" haltonfailure="false" haltonerror="false" showoutput="true" logfailedtests="true" maxmemory="256m">
<sysproperty key="java.library.path" path="${opencv.lib.path}"/>
2016-12-06 22:42:00 +08:00
<env key="PATH" path="${opencv.lib.path}:${env.PATH}:${env.Path}"/>
2012-12-20 06:28:59 +08:00
<classpath refid="master-classpath"/>
<classpath>
<pathelement location="build/classes"/>
2012-12-20 06:28:59 +08:00
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="${test.dir}">
<zipfileset src="build/jar/opencv-test.jar" includes="**/*.class" excludes="**/OpenCVTest*">
<exclude name="**/*$*.class"/>
</zipfileset>
2012-12-20 06:28:59 +08:00
</batchtest>
</junit>
<junitreport todir="${test.dir}">
<fileset dir="${test.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report format="noframes" todir="${test.dir}"/>
</junitreport>
2012-12-20 06:28:59 +08:00
</target>
2017-12-29 12:15:30 +08:00
<target name="build" depends="jar">
</target>
2017-12-29 12:15:30 +08:00
<target name="buildAndTest" depends="test">
2012-12-20 06:28:59 +08:00
</target>
</project>