2012-12-20 06:28:59 +08:00
|
|
|
<project>
|
2016-12-06 22:42:00 +08:00
|
|
|
<property environment="env"/>
|
2013-10-16 23:22:01 +08:00
|
|
|
<property file="ant-${opencv.build.type}.properties"/>
|
2014-09-11 15:56:05 +08:00
|
|
|
<property name="test.dir" value="testResults"/>
|
|
|
|
<property name="build.dir" value="build"/>
|
2013-10-16 23:22:01 +08:00
|
|
|
|
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"/>
|
2014-09-11 15:56:05 +08:00
|
|
|
<delete dir="${test.dir}"/>
|
2012-12-20 06:28:59 +08:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile">
|
|
|
|
<mkdir dir="build/classes"/>
|
|
|
|
|
2013-01-22 23:43:54 +08:00
|
|
|
<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>
|
|
|
|
|
|
|
|
<target name="jar">
|
|
|
|
<mkdir dir="build/jar"/>
|
|
|
|
<jar destfile="build/jar/opencv-test.jar" basedir="build/classes">
|
|
|
|
<manifest>
|
2013-01-22 23:43:54 +08:00
|
|
|
<attribute name="Main-Class" value="org.opencv.test.OpenCVTestRunner"/>
|
2012-12-20 06:28:59 +08:00
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="test">
|
2014-09-11 15:56:05 +08:00
|
|
|
<mkdir dir="${test.dir}"/>
|
2016-11-23 00:49:55 +08:00
|
|
|
<junit printsummary="true" haltonfailure="false" haltonerror="false" showoutput="true" logfailedtests="true" maxmemory="256m">
|
2013-10-16 23:22:01 +08:00
|
|
|
<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>
|
2013-01-22 21:56:04 +08:00
|
|
|
<pathelement location="build/classes"/>
|
2012-12-20 06:28:59 +08:00
|
|
|
</classpath>
|
|
|
|
|
|
|
|
<formatter type="xml"/>
|
|
|
|
|
2014-09-11 15:56:05 +08:00
|
|
|
<batchtest fork="yes" todir="${test.dir}">
|
2013-01-22 23:43:54 +08:00
|
|
|
<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>
|
2014-09-11 15:56:05 +08:00
|
|
|
<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>
|
|
|
|
|
2013-01-22 23:43:54 +08:00
|
|
|
<target name="build">
|
|
|
|
<antcall target="compile"/>
|
|
|
|
<antcall target="jar"/>
|
|
|
|
</target>
|
|
|
|
|
2012-12-20 06:28:59 +08:00
|
|
|
<target name="buildAndTest">
|
|
|
|
<antcall target="compile"/>
|
|
|
|
<antcall target="jar"/>
|
|
|
|
<antcall target="test"/>
|
|
|
|
</target>
|
2013-10-16 23:22:01 +08:00
|
|
|
</project>
|