[med-svn] [r-cran-globals] 01/01: add autopkgtest

Michael Crusoe misterc-guest at moszumanska.debian.org
Sun Jun 26 14:55:33 UTC 2016


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

misterc-guest pushed a commit to branch master
in repository r-cran-globals.

commit d98fe011b8dec15ca272d3695eda87030d36af24
Author: Michael R. Crusoe <crusoe at ucdavis.edu>
Date:   Sun Jun 26 07:53:31 2016 -0700

    add autopkgtest
---
 debian/README.test         |  8 ++++++++
 debian/docs                |  3 +++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 16 ++++++++++++++++
 4 files changed, 30 insertions(+)

diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..55a9142
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+To run the unit tests provided by the package you can do
+
+   sh  run-unit-test
+
+in this directory.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..960011c
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+tests
+debian/README.test
+debian/tests/run-unit-test
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..1c1b6fe
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+pkg=r-cran-globals
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
+find . -name "*.gz" -exec gunzip \{\} \;
+export LC_ALL=C
+for test in *R
+do
+  R CMD BATCH ${test}
+  echo "Test ${test} passed"
+done
+rm -f $ADTTMP/*

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



More information about the debian-med-commit mailing list