]> WPIA git - gigi.git/blobdiff - build.xml
Another classpath error
[gigi.git] / build.xml
index bada13d416487acc91fafdad1a5682d999a9febf..630a0117d3594dad0980c3abfc0e77db0a89a989 100644 (file)
--- a/build.xml
+++ b/build.xml
         <path refid="JUnit 4.libraryclasspath"/>
         <pathelement location="${mysqlconnector}"/>
     </path>
+    <path id="cacert-gigi.test.classpath">
+        <pathelement location="bintest"/>
+        <path refid="JUnit 4.libraryclasspath"/>
+        <pathelement location="${mysqlconnector}"/>
+    </path>
     <target name="init">
         <mkdir dir="bin"/>
+        <mkdir dir="bintest"/>
+        
         <copy includeemptydirs="false" todir="bin">
             <fileset dir="lib/servlet-api">
                 <exclude name="**/*.launch"/>
@@ -41,7 +48,7 @@
                 <exclude name="**/*.java"/>
             </fileset>
         </copy>
-        <copy includeemptydirs="false" todir="bin">
+        <copy includeemptydirs="false" todir="bintest">
             <fileset dir="tests">
                 <exclude name="**/*.launch"/>
                 <exclude name="**/*.java"/>
             <src path="lib/jetty"/>
             <src path="src"/>
             <src path="util"/>
-            <src path="tests"/>
             <classpath refid="cacert-gigi.classpath"/>
         </javac>
     </target>
+    <target depends="init" name="build-project-test">
+        <echo message="${ant.project.name}: ${ant.file}"/>
+        <javac debug="true" debuglevel="${debuglevel}" destdir="bintest" includeantruntime="false" source="${source}" target="${target}">
+            <src path="tests"/>
+            <classpath refid="cacert-gigi.test.classpath"/>
+        </javac>
+    </target>
     <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
     <target name="FetchLocales">
         <java classname="org.cacert.gigi.util.FetchLocales" failonerror="true" fork="yes">
             <classpath refid="cacert-gigi.classpath"/>
         </java>
     </target>
-    <target name="TestSSL">
+    <target name="test" depends="build-project-test">
         <mkdir dir="${junit.output.dir}"/>
         <junit fork="yes" printsummary="withOutAndErr">
             <formatter type="xml"/>
             <test name="org.cacert.gigi.TestSSL" todir="${junit.output.dir}"/>
+            <test name="org.cacert.gigi.pages.main.ResgisterPageTest" todir="${junit.output.dir}"/>
             <classpath refid="cacert-gigi.classpath"/>
         </junit>
     </target>