Add test libs

This commit is contained in:
y.ridkous@gmail.com 2016-03-12 21:22:53 +02:00
parent 7b08992fd0
commit 6de0cd3dcc
4 changed files with 18 additions and 4 deletions

View file

@ -9,9 +9,12 @@
<property name="bin.dir" value="bin" /> <property name="bin.dir" value="bin" />
<property name="bin.absolute.dir" location="${bin.dir}" /> <property name="bin.absolute.dir" location="${bin.dir}" />
<property name="lib.dir" value="libs" /> <property name="lib.dir" value="libs" />
<property name="lib.absolute.dir" location="${lib.dir}" />
<property name="unit.dir" value="test/java" /> <property name="unit.dir" value="test/java" />
<property name="unit.absolute.dir" location="${unit.dir}" /> <property name="unit.absolute.dir" location="${unit.dir}" />
<property name="lib.absolute.dir" location="${lib.dir}" /> <property name="test.lib.dir" value="test-libs" />
<property name="test.lib.absolute.dir" location="${test.lib.dir}" />
<property name="java.encoding" value="UTF-8" /> <property name="java.encoding" value="UTF-8" />
<path id="build.path"> <path id="build.path">
@ -20,6 +23,13 @@
</fileset> </fileset>
</path> </path>
<path id="test-lib.path">
<fileset dir="${test.lib.absolute.dir}">
<include name="*.jar" />
</fileset>
</path>
<path id="unit.test.path"> <path id="unit.test.path">
<path refid="build.path"/> <path refid="build.path"/>
<pathelement path="test/java"/> <pathelement path="test/java"/>
@ -36,7 +46,10 @@
<target name="compileUnitTests" depends="compile"> <target name="compileUnitTests" depends="compile">
<javac srcdir="test/" destdir="${bin.absolute.dir}"> <javac srcdir="test/" destdir="${bin.absolute.dir}">
<classpath refid="unit.test.path"/> <classpath>
<path refid="build.path"/>
<path refid="test-lib.path" />
</classpath>
</javac> </javac>
<copy todir="${bin.absolute.dir}"> <copy todir="${bin.absolute.dir}">
<fileset dir="test/java"> <fileset dir="test/java">
@ -50,6 +63,7 @@
<classpath> <classpath>
<pathelement path="bin"/> <pathelement path="bin"/>
<path refid="build.path"/> <path refid="build.path"/>
<path refid="test-lib.path" />
</classpath> </classpath>
<test name="net.osmand.router.RouteResultPreparationTest" haltonfailure="no" outfile="result"> <test name="net.osmand.router.RouteResultPreparationTest" haltonfailure="no" outfile="result">
<formatter type="plain"/> <formatter type="plain"/>
@ -92,7 +106,7 @@
</copy> </copy>
<copy todir="${src.absolute.dir}"> <copy todir="${src.absolute.dir}">
<fileset dir="${protobuf.src}"/> <fileset dir="${protobuf.src}"/>
</copy> </copy>
<patch patchfile="protobuf.patch" dir=".."/> <patch patchfile="protobuf.patch" dir=".."/>
</target> </target>
<target name="compile" depends="-dirs,copy_resources"> <target name="compile" depends="-dirs,copy_resources">
@ -113,7 +127,7 @@
</exec> </exec>
<antcall target="jar" /> <antcall target="jar" />
</target> </target>
<target name="native-legacy-libs-jar" depends="compile"> <target name="native-legacy-libs-jar" depends="compile">
<exec command="bash collect_legacy_libs.sh" failonerror="true"> <exec command="bash collect_legacy_libs.sh" failonerror="true">
</exec> </exec>