[r-cran-hypergeo] 01/01: Added d/tests/

Jonathon Love jon at thon.cc
Thu Sep 10 08:44:05 UTC 2015


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

jonathon-guest pushed a commit to branch master
in repository r-cran-hypergeo.

commit 7b152cfd77e4b8dbf861175cae761d7e5343ae7b
Author: Jonathon Love <jon at thon.cc>
Date:   Thu Sep 10 10:43:56 2015 +0200

    Added d/tests/
---
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 20 ++++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..0a042a9
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+
+pkg=r-cran-hypergeo
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
+
+for runtest in `ls *.R` ; do
+   LC_ALL=C R --no-save < $runtest >/dev/null
+   if [ ! $? ] ; then
+     echo "Test ${runtest} failed"
+     exit 1
+   else
+     echo "Test ${runtest} passed"
+   fi
+done
+rm -rf $ADTTMP/*

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



More information about the debian-science-commits mailing list