[med-svn] [r-cran-proto] 09/11: Add autopkgtest

Andreas Tille tille at debian.org
Tue Dec 6 17:56:56 UTC 2016


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

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

commit 51ef14c60665e9c135c4ae37cbb9ddc96e8b0517
Author: Andreas Tille <tille at debian.org>
Date:   Tue Dec 6 18:34:01 2016 +0100

    Add autopkgtest
---
 debian/README.test         |  7 ++++---
 debian/changelog           |  1 +
 debian/docs                |  3 +++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 13 +++++++++++++
 5 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/debian/README.test b/debian/README.test
index d586f76..57396d7 100644
--- a/debian/README.test
+++ b/debian/README.test
@@ -1,7 +1,8 @@
 Notes on how this package can be tested.
 ────────────────────────────────────────
 
-This package can be tested by loading it into R with the command
-‘library(proto)’ in order to confirm its integrity.
+This package can be tested by running the provided test:
 
- -- Carlos Borroto <carlos.borroto at gmail.com>  Tue, 31 Jan 2012 16:41:00 -0500
+   sh run-unit-test
+
+in order to confirm its integrity.
diff --git a/debian/changelog b/debian/changelog
index 9080f08..13130c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ r-cran-proto (1.0.0-1) UNRELEASED; urgency=medium
   * Update copyright
   * debhelper 10
   * d/watch: version=4
+  * Add autopkgtest
 
  -- Andreas Tille <tille at debian.org>  Tue, 06 Dec 2016 18:23:11 +0100
 
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..b044b0c
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, r-cran-testthat
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..6faf925
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+
+oname=proto
+pkg=r-cran-`echo $oname | tr '[A-Z]' '[a-z]'`
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
+find . -name "*.gz" -exec gunzip \{\} \;
+LC_ALL=C R --no-save < testthat.R

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



More information about the debian-med-commit mailing list