[med-svn] [Git][med-team/artemis][master] 2 commits: Marking current autopkgtest as superficial
Pierre Gruet
gitlab at salsa.debian.org
Thu Nov 12 20:45:48 GMT 2020
Pierre Gruet pushed to branch master at Debian Med / artemis
Commits:
4ae17fff by Pierre Gruet at 2020-11-12T15:47:58+01:00
Marking current autopkgtest as superficial
- - - - -
18aeaafc by Pierre Gruet at 2020-11-12T21:45:17+01:00
Adding an autopkgtest running some build tests
- - - - -
3 changed files:
- debian/changelog
- debian/tests/control
- + debian/tests/run-some-unit-tests
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+artemis (18.1.0+dfsg-2) UNRELEASED; urgency=medium
+
+ * Marking current autopkgtest as superficial (Closes: #974437)
+ * Adding an autopkgtest running some build tests
+
+ -- Pierre Gruet <pgtdebian at free.fr> Thu, 12 Nov 2020 21:44:47 +0100
+
artemis (18.1.0+dfsg-1) unstable; urgency=medium
[ Andreas Tille ]
=====================================
debian/tests/control
=====================================
@@ -1,3 +1,7 @@
Test-Command: xvfb-run --auto-servernum --server-args="-screen 0 1024x768x24" /usr/bin/bamview -h
Depends: @, xvfb, xauth
+Restrictions: allow-stderr, superficial
+
+Tests: run-some-unit-tests
+Depends: @, default-jdk, junit4, libmockito-java
Restrictions: allow-stderr
=====================================
debian/tests/run-some-unit-tests
=====================================
@@ -0,0 +1,66 @@
+#!/bin/bash
+set -e
+
+# autopkgtest check: run some unit tests. Some other tests try to launch X11
+# or connect through ssh, having the selected one run should be good enough.
+# (C) 2020 Pierre Gruet.
+# Author: Pierre Gruet <pgtdebian at free.fr>
+
+
+pkg=artemis
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+ AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a src/ "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+cd src/test/java/
+
+# Putting the way to the installed jar in the classpath.
+export CLASSPATH=$CLASSPATH:.:/usr/share/java/artemis.jar:/usr/share/java/junit4.jar:/usr/share/java/mockito-core.jar
+
+cat <<EOF > JunitTestSuite.java
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+ at RunWith(Suite.class)
+ at Suite.SuiteClasses({
+ uk.ac.sanger.artemis.util.IconManagerTest.class,
+ uk.ac.sanger.artemis.circular.digest.CircularGenomeControllerTest.class,
+ uk.ac.sanger.artemis.circular.digest.UtilsTest.class
+})
+
+public class JunitTestSuite {
+}
+EOF
+
+# Create runner class
+cat <<EOF > TestRunner.java
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+
+public class TestRunner {
+ public static void main(String[] args) {
+ Result result = JUnitCore.runClasses(JunitTestSuite.class);
+
+ for (Failure failure : result.getFailures()) {
+ System.out.println(failure.toString());
+ }
+
+ if (result.getFailureCount() > 0)
+ System.exit(1);
+ }
+}
+EOF
+
+
+# Building test classes.
+javac `find . -name "*.java"`
+
+# Running the tests
+java -Xmx4g -noverify -Djdbc.drivers=org.postgresql.Driver -DEMBOSS_ROOT="/usr" --illegal-access=warn -Dtimeout=8000 -Duse_separate_classloader=false TestRunner
View it on GitLab: https://salsa.debian.org/med-team/artemis/-/compare/6ff1b0d7b2031d7c0bd6f31b79349913df466500...18aeaafc99104949e1aa248cc35f8abfae738347
--
View it on GitLab: https://salsa.debian.org/med-team/artemis/-/compare/6ff1b0d7b2031d7c0bd6f31b79349913df466500...18aeaafc99104949e1aa248cc35f8abfae738347
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201112/917cdf49/attachment-0001.html>
More information about the debian-med-commit
mailing list