[med-svn] [r-cran-truncnorm] 02/13: Add autopkgtest

Andreas Tille tille at debian.org
Thu Nov 30 14:39:03 UTC 2017


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

tille pushed a commit to branch master
in repository r-cran-truncnorm.

commit adfc36ad1c8a8bff6ee9f9fb16e6e7b08afd89d5
Author: Andreas Tille <tille at debian.org>
Date:   Fri Jun 20 11:10:45 2014 +0000

    Add autopkgtest
---
 debian/README.test         |  8 ++++++++
 debian/control             |  1 +
 debian/docs                |  3 +++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 13 +++++++++++++
 5 files changed, 28 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/control b/debian/control
index e0cc419..8441581 100644
--- a/debian/control
+++ b/debian/control
@@ -3,6 +3,7 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.
 Uploaders: Andreas Tille <tille at debian.org>
 Section: gnu-r
 Priority: optional
+Testsuite: autopkgtest
 Build-Depends: debhelper (>= 9),
                cdbs,
                r-base-dev
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..3adf0d6
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+debian/README.test
+debian/tests/run-unit-test
+tests
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..25377fc
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, r-cran-runit
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..e68ea91
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+
+pkg=r-cran-truncnorm
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp /usr/share/doc/${pkg}/tests/* $ADTTMP
+gunzip *.gz
+for runtest in `ls *.R` ; do
+    R --no-save < $runtest
+done
+rm -f $ADTTMP/*

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



More information about the debian-med-commit mailing list