]> WPIA git - gigi.git/blobdiff - build.xml
add "FetchLocales" to test target
[gigi.git] / build.xml
index 630a0117d3594dad0980c3abfc0e77db0a89a989..484f6c3afa5c0c7e59f3287adbc87a69746c7025 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -6,16 +6,17 @@
     <property name="target" value="1.8"/>
     <property name="source" value="1.8"/>
     <property name="mysqlconnector" value="mysql-connector-java-5.1.31-bin.jar"/>
-    <property name="juintexec" value="junit.jar"/>
+    <property name="juintexec" value="."/>
     <path id="JUnit 4.libraryclasspath">
-        <pathelement location="${juintexec}"/>
+        <pathelement location="${juintexec}/junit.jar"/>
+        <pathelement location="${juintexec}/org.hamcrest.core.jar"/>
     </path>
     <path id="cacert-gigi.classpath">
         <pathelement location="bin"/>
-        <path refid="JUnit 4.libraryclasspath"/>
         <pathelement location="${mysqlconnector}"/>
     </path>
     <path id="cacert-gigi.test.classpath">
+        <pathelement location="bin"/>
         <pathelement location="bintest"/>
         <path refid="JUnit 4.libraryclasspath"/>
         <pathelement location="${mysqlconnector}"/>
@@ -66,6 +67,7 @@
         <javac debug="true" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
             <src path="lib/servlet-api"/>
             <src path="lib/jetty"/>
+            <src path="lib/jtar"/>
             <src path="src"/>
             <src path="util"/>
             <classpath refid="cacert-gigi.classpath"/>
             <classpath refid="cacert-gigi.classpath"/>
         </java>
     </target>
-    <target name="test" depends="build-project-test">
+    
+    <target name="check-generateKeys">
+        <available file="config/keystore.pkcs12" property="keystore.present"/>
+    </target>
+    <target name="generateKeys" depends="check-generateKeys" unless="keystore.present">
+        <exec executable="./generateKeys.sh" dir="doc/scripts"/>
+        <exec executable="./generateTruststore.sh" dir="doc/scripts">
+            <arg value="-noprompt"/>
+        </exec>
+    </target>
+    <target name="test" depends="build-project-test,generateKeys,FetchLocales">
         <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"/>
+            <test name="org.cacert.gigi.LoginTest" todir="${junit.output.dir}"/>
+            <test name="org.cacert.gigi.pages.main.RegisterPageTest" todir="${junit.output.dir}"/>
+            <classpath refid="cacert-gigi.test.classpath"/>
         </junit>
     </target>
     <target name="junitreport">