[jel] 01/01: Enable CI tests

Ole Streicher olebole at moszumanska.debian.org
Wed Feb 22 11:14:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch master
in repository jel.

commit 9b9f50dd6c0270ca5e66063edd66b2f611fde21f
Author: Ole Streicher <olebole at debian.org>
Date:   Wed Feb 22 12:13:52 2017 +0100

    Enable CI tests
---
 debian/tests/build.xml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
 debian/tests/control   |  3 +++
 debian/tests/jel-test  |  9 ++++++++
 3 files changed, 72 insertions(+)

diff --git a/debian/tests/build.xml b/debian/tests/build.xml
new file mode 100644
index 0000000..0a0d99a
--- /dev/null
+++ b/debian/tests/build.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+
+<project name="JEL CI tests" default="test" basedir=".">
+  
+  <property name="build.dir" value="build"/>
+  <property name="src.dir" value="."/>
+  <property name="build.tests" value="${build.dir}/tests"/>
+  <property name="tests.dir" value="${src.dir}/tests"/>
+
+  <property name="junit.fork" value="true"/>
+  <property name="junit.filtertrace" value="off"/>
+  <property name="junit.summary" value="no"/>
+
+  <path id="tests-classpath">
+    <pathelement location="/usr/share/java/jel.jar"/>
+    <pathelement location="/usr/share/java/junit.jar"/>
+    <pathelement location="${build.tests}"/>
+    <pathelement location="${tests.dir}"/>
+  </path>
+
+  <target name="compile-tests">
+    <mkdir dir="${build.tests}"/>
+
+    <javac srcdir="${tests.dir}"
+           destdir="${build.tests}"
+	   includeantruntime="false" >
+      <classpath refid="tests-classpath"/>
+    </javac>
+  </target>
+
+  <target name="test" depends="run-tests" description="-> run JUnit tests"/>
+
+  <target name="run-tests" depends="compile-tests">
+
+    <junit printsummary="${junit.summary}" haltonfailure="yes"
+           filtertrace="${junit.filtertrace}"
+           fork="${junit.fork}">
+
+      <jvmarg value="-enableassertions"/>
+      <classpath refid="tests-classpath"/>
+
+      <sysproperty key="java.io.tmpdir" value="${build.tests}"/>
+      <sysproperty key="build.tests" value="${build.tests}"/>
+      <sysproperty key="tests-classpath.value"
+                   value="${tests-classpath.value}"/>
+      <sysproperty key="java.awt.headless" value="${java.awt.headless}"/>
+
+      <formatter type="plain" usefile="false"/>
+
+      <batchtest>
+        <fileset dir="${tests.dir}">
+          <include name="**/*Test.java"/>
+        </fileset>
+      </batchtest>
+
+    </junit>
+  </target>
+
+</project>
+
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..9f04f07
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: jel-test
+Depends: jel-java,
+         ant, ant-optional, default-jdk, junit
diff --git a/debian/tests/jel-test b/debian/tests/jel-test
new file mode 100755
index 0000000..b9f4e7d
--- /dev/null
+++ b/debian/tests/jel-test
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+rm -rf ${ADTTMP}/*
+cp -a debian/tests/build.xml source/src/tests ${ADTTMP}
+cd ${ADTTMP}
+
+ant test -Djava.awt.headless=True

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/jel.git



More information about the debian-science-commits mailing list