[med-svn] [graphlan] 05/14: Add test suite
Andreas Tille
tille at debian.org
Wed Nov 15 10:35:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository graphlan.
commit a543a83abd0601ce37f3d11efbc689397eed2003
Author: Andreas Tille <tille at debian.org>
Date: Wed Jun 1 09:30:34 2016 +0000
Add test suite
---
debian/README.test | 12 ++++++++++++
debian/docs | 2 ++
debian/tests/control | 3 +++
debian/tests/run-unit-test | 22 ++++++++++++++++++++++
4 files changed, 39 insertions(+)
diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..df6cfc9
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,12 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+GraPhlAn comes with a set of examples which can be found in a
+subdirectory here. You can use the shell scripts inside the
+subdirectories for testing but you need to copy the files to
+some place werte you have write permissions and gunzip the
+compressed data files.
+
+Alternatively you can run the script run-unit-test in this
+directory which runs all available examples as tests.
+
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..9a4f4f8
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+debian/README.test
+debian/tests/run-unit-test
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..b0de1be
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, r-cran-gsl, r-cran-randomfields
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..323c387
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+pkg=graphlan
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/examples/* $ADTTMP
+find . -name "*.gz" -exec gunzip \{\} \;
+for testdir in `find . -mindepth 1 -maxdepth 1 -type d` ; do
+ cd $testdir
+ for tscript in `ls *.sh | sort` ; do
+ if grep -q export2graphlan $tscript ; then
+ echo "Test script $testdir/$tscript requires export2graphlan which is not available."
+ else
+ echo "Running test script $testdir/$tscript ."
+ sh $tscript
+ fi
+ done
+ cd ..
+done
+rm -rf $ADTTMP/*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/graphlan.git
More information about the debian-med-commit
mailing list