[med-svn] [ismrmrd] 02/06: Add packaging testsuite.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sat Mar 5 17:25:58 UTC 2016


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

ghisvail-guest pushed a commit to branch master
in repository ismrmrd.

commit 8d528ba763d32233c11c220e68289b61447c06fb
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Sat Mar 5 11:58:43 2016 +0000

    Add packaging testsuite.
---
 debian/control        |  1 +
 debian/tests/control  |  5 +++++
 debian/tests/examples | 25 +++++++++++++++++++++++++
 3 files changed, 31 insertions(+)

diff --git a/debian/control b/debian/control
index e493446..9b9ae67 100644
--- a/debian/control
+++ b/debian/control
@@ -2,6 +2,7 @@ Source: ismrmrd
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Ghislain Antony Vaillant <ghisvail at gmail.com>
 Section: science
+Testsuite: autopkgtest
 Priority: optional
 Build-Depends: cmake,
                debhelper (>= 9),
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..9e6731f
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,5 @@
+Tests: examples
+Depends: build-essential,
+         cmake,
+         libismrmrd-dev,
+         libismrmrd-doc
diff --git a/debian/tests/examples b/debian/tests/examples
new file mode 100755
index 0000000..2d5c478
--- /dev/null
+++ b/debian/tests/examples
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Copyright 2016 Ghislain Antony Vaillant
+
+set -e
+
+# Presence of $ADTTMP implies that someone will handle cleanup for us, so we
+# can avoid duplicating the effort (signal handling, etc.) here.
+if [ -z "$ADTTMP" ]
+then
+	echo "Required envvar \"$ADTTMP\"is not set" >&2
+	exit 1
+fi
+
+# Copy example source code.
+cp -a /usr/share/doc/libismrmrd-doc/examples/c/* "$ADTTMP"
+cd "$ADTTMP"
+
+# Configure and build.
+mkdir build && cd build
+ISMRMRD_HOME=/usr cmake ./..
+echo "configure: OK"
+make -j$(nproc)
+echo "build: OK"
+./ismrmrd_c_example 2>&1
+echo "run: OK"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/ismrmrd.git



More information about the debian-med-commit mailing list