[med-svn] r22059 - in trunk/packages/graphlan/trunk/debian: . tests

Andreas Tille tille at moszumanska.debian.org
Wed Jun 1 09:30:34 UTC 2016


Author: tille
Date: 2016-06-01 09:30:34 +0000 (Wed, 01 Jun 2016)
New Revision: 22059

Added:
   trunk/packages/graphlan/trunk/debian/README.test
   trunk/packages/graphlan/trunk/debian/docs
   trunk/packages/graphlan/trunk/debian/tests/
   trunk/packages/graphlan/trunk/debian/tests/control
   trunk/packages/graphlan/trunk/debian/tests/run-unit-test
Log:
Add test suite


Added: trunk/packages/graphlan/trunk/debian/README.test
===================================================================
--- trunk/packages/graphlan/trunk/debian/README.test	                        (rev 0)
+++ trunk/packages/graphlan/trunk/debian/README.test	2016-06-01 09:30:34 UTC (rev 22059)
@@ -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.
+

Added: trunk/packages/graphlan/trunk/debian/docs
===================================================================
--- trunk/packages/graphlan/trunk/debian/docs	                        (rev 0)
+++ trunk/packages/graphlan/trunk/debian/docs	2016-06-01 09:30:34 UTC (rev 22059)
@@ -0,0 +1,2 @@
+debian/README.test
+debian/tests/run-unit-test

Added: trunk/packages/graphlan/trunk/debian/tests/control
===================================================================
--- trunk/packages/graphlan/trunk/debian/tests/control	                        (rev 0)
+++ trunk/packages/graphlan/trunk/debian/tests/control	2016-06-01 09:30:34 UTC (rev 22059)
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, r-cran-gsl, r-cran-randomfields
+Restrictions: allow-stderr

Added: trunk/packages/graphlan/trunk/debian/tests/run-unit-test
===================================================================
--- trunk/packages/graphlan/trunk/debian/tests/run-unit-test	                        (rev 0)
+++ trunk/packages/graphlan/trunk/debian/tests/run-unit-test	2016-06-01 09:30:34 UTC (rev 22059)
@@ -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/*




More information about the debian-med-commit mailing list