[r-cran-mi] 11/13: Add autopkgtest for unit tests.
Sébastien Villemot
sebastien at debian.org
Sun Oct 1 19:32:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository r-cran-mi.
commit 018cc115d36dcd64e1a38af7ce90e25f218558fb
Author: Sébastien Villemot <sebastien at debian.org>
Date: Sun Oct 1 21:30:11 2017 +0200
Add autopkgtest for unit tests.
---
debian/r-cran-mi.docs | 2 ++
debian/tests/control | 5 +++++
debian/tests/run-unit-test | 17 +++++++++++++++++
3 files changed, 24 insertions(+)
diff --git a/debian/r-cran-mi.docs b/debian/r-cran-mi.docs
new file mode 100644
index 0000000..67ce40b
--- /dev/null
+++ b/debian/r-cran-mi.docs
@@ -0,0 +1,2 @@
+debian/tests/run-unit-test
+tests
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..6206e54
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,5 @@
+Tests: run-unit-test
+Depends: @, r-cran-truncnorm, r-cran-survival
+Restrictions: allow-stderr
+
+
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..8e3448f
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+pkgname=mi
+debname=r-cran-mi
+
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=`mktemp -d /tmp/${debname}-test.XXXXXX`
+ trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/$debname/tests/* $ADTTMP
+gunzip -r *
+for testfile in *.R; do
+ echo "BEGIN TEST $testfile"
+ LC_ALL=C R --no-save < $testfile
+done
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-mi.git
More information about the debian-science-commits
mailing list