Set YAZ_LIBS correctly.
[yaz4j-moved-to-github.git] / build.xml
index 6b7e985..3ad9842 100644 (file)
--- a/build.xml
+++ b/build.xml
     </javac>
   </target>
 
-  <target name="test" depends="compile" description="test the code">
+  <target name="compile-test" depends="compile" description="compile test the code">
     <javac srcdir="${test}" destdir="${bin}">
        <classpath refid="project.classpath"/>
     </javac>
   </target>
 
+  <!-- LD_LIBRARY_PATH=libyaz4j/lib java -cp bin:dependencies/JUnit-4.3.1/junit-4.3.1.jar org.junit.runner.JUnitCore yaz4jtest.ConnectionTest -->
+
+  <target name="unit-test" depends="compile-test" description="test the code">
+    <junit fork="on">
+       <env key="LD_LIBRARY_PATH" value="libyaz4j/lib"/>
+       <classpath refid="project.classpath"/>
+       <test name="yaz4jtest.ConnectionTest"/>
+    </junit>
+  </target>
+
   <target name="build-dist" depends="compile" description="generate the distribution">
     <mkdir dir="${distributions}/${version}"/>
     <jar jarfile="${distributions}/${version}/yaz4j.jar" basedir="${bin}">