<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.8" />
<property name="source" value="1.8" />
- <property name="mysqlconnector" value="/usr/share/java/mysql-connector-java.jar" />
+ <property name="sqlconnector" value="/usr/share/java/postgresql-jdbc4.jar" />
<property name="juintexec" value="/usr/share/java" />
<path id="JUnit 4.libraryclasspath">
<pathelement location="${juintexec}/junit4.jar" />
<path id="cacert-gigi.classpath">
<pathelement location="bin" />
<pathelement location="binutil" />
- <pathelement location="${mysqlconnector}" />
+ <pathelement location="${sqlconnector}" />
</path>
<path id="cacert-gigi.test.classpath">
<pathelement location="bintest" />
<pathelement location="binutil" />
<pathelement location="binutil-testing" />
<path refid="JUnit 4.libraryclasspath" />
- <pathelement location="${mysqlconnector}" />
+ <pathelement location="${sqlconnector}" />
+ </path>
+ <path id="cacert-gigi.test.classpath.jdt">
+ <pathelement location="${jdt}" />
</path>
<target name="init">
<mkdir dir="bin" />
<target depends="clean,clean-test" name="cleanall" />
<target depends="build-project, build-testing, native" name="build" />
<target depends="init" name="build-project">
+ <exec outputproperty="git-version" executable="git">
+ <arg line="rev-parse"/>
+ <arg line="HEAD"/>
+ </exec>
+ <manifest file="Gigi.MF">
+ <attribute name="Main-Class" value="org.cacert.gigi.Launcher" />
+ <attribute name="Implementation-Version" value="${git-version}" />
+ </manifest>
<echo message="${ant.project.name}: ${ant.file}" />
- <javac debug="true" debuglevel="${debuglevel}" destdir="bin"
+ <javac encoding="UTF-8" debug="true" debuglevel="${debuglevel}" destdir="bin"
includeantruntime="false" source="${source}" target="${target}">
<compilerarg value="-XDignore.symbol.file"/>
<src path="lib/servlet-api" />
<src path="src" />
<classpath refid="cacert-gigi.classpath" />
</javac>
- <javac debug="true" debuglevel="${debuglevel}" destdir="binutil"
+ <javac encoding="UTF-8" debug="true" debuglevel="${debuglevel}" destdir="binutil"
includeantruntime="false" source="${source}" target="${target}">
<compilerarg value="-XDignore.symbol.file"/>
<src path="util" />
</javac>
</target>
<target depends="init, build-project" name="build-testing">
- <javac debug="true" debuglevel="${debuglevel}" destdir="binutil-testing"
+ <javac encoding="UTF-8" debug="true" debuglevel="${debuglevel}" destdir="binutil-testing"
+ includeantruntime="false" source="${source}" target="${target}">
+ <compilerarg value="-XDignore.symbol.file"/>
+ <src path="util-testing" />
+ <exclude name="org/cacert/gigi/localisation/**"/>
+ <classpath refid="cacert-gigi.classpath" />
+ </javac>
+ </target>
+ <target depends="init, build-project" name="build-testing-l10n">
+ <javac encoding="UTF-8" debug="true" debuglevel="${debuglevel}" destdir="binutil-testing"
includeantruntime="false" source="${source}" target="${target}">
+ <compilerarg value="-XDignore.symbol.file"/>
<src path="util-testing" />
+ <include name="org/cacert/gigi/localisation/**"/>
<classpath refid="cacert-gigi.classpath" />
+ <classpath refid="cacert-gigi.test.classpath.jdt" />
</javac>
+ <java classname="org.cacert.gigi.localisation.TranslationCollector">
+ <arg value="util-testing/org/cacert/gigi/localisation/conf.txt"/>
+ <arg value="."/>
+ <arg value="messages.po"/>
+ <classpath refid="cacert-gigi.test.classpath" />
+ <classpath refid="cacert-gigi.test.classpath.jdt" />
+ </java>
</target>
<target name="native">
<target depends="init,build-testing,update-effective-tlds" name="build-project-test">
<echo message="${ant.project.name}: ${ant.file}" />
- <javac debug="true" debuglevel="${debuglevel}" destdir="bintest"
+ <javac encoding="UTF-8" debug="true" debuglevel="${debuglevel}" destdir="bintest"
includeantruntime="false" source="${source}" target="${target}">
<compilerarg value="-XDignore.symbol.file"/>
<src path="tests" />
</javac>
<concat destfile="bintest/org/cacert/gigi/util/effective_tld_names.dat">
<path path="bin/org/cacert/gigi/util/effective_tld_names.dat"/>
- <footer>${test_nic}</footer>
+ <path path="publicSuffixFooter.dat"/>
</concat>
</target>
<target name="check-locale">
<java classname="org.cacert.gigi.util.FetchLocales" failonerror="true"
fork="yes">
<classpath refid="cacert-gigi.classpath" />
+ <arg value="${localePath}"/>
</java>
</target>
<target name="check-generateKeys">
<classpath refid="cacert-gigi.test.classpath" />
</java>
</target>
- <target name="test" depends="build-project-test,generateKeys,FetchLocales,pack-testing,pack,reset-db">
+ <target name="test" depends="build-project-test,FetchLocales,pack-testing,pack,reset-db">
<delete failonerror="false">
<fileset dir=".">
<include name="jacoco.exec"/>
</fileset>
</delete>
<mkdir dir="${junit.output.dir}" />
- <junit fork="yes" printsummary="withOutAndErr">
+ <junit maxmemory="2g" fork="yes" printsummary="withOutAndErr">
<jvmarg value="-javaagent:/usr/share/java/jacocoagent.jar=destfile=tester.exec"/>
+ <jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:50001"/>
<formatter type="xml" />
<batchtest fork="yes" todir="${junit.output.dir}">
<fileset dir="tests">
</junitreport>
</target>
<target name="generatecoco">
+ <delete file="merged.exec"/>
+
<jacoco:merge destfile="merged.exec">
<fileset dir="." includes="*.exec"/>
</jacoco:merge>