[med-svn] [r-cran-stringr] 08/09: Add autopkgtest

Andreas Tille tille at debian.org
Sat Nov 12 07:47:20 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-stringr.

commit bfe2e28729e5adc4584710092f255cdb45b83222
Author: Andreas Tille <tille at debian.org>
Date:   Sat Nov 12 08:39:25 2016 +0100

    Add autopkgtest
---
 debian/README.test         |  8 ++++++++
 debian/changelog           |  2 ++
 debian/docs                |  3 +++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 11 +++++++++++
 debian/watch               |  2 +-
 6 files changed, 28 insertions(+), 1 deletion(-)

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/changelog b/debian/changelog
index 5d8eb95..861ebe1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ r-cran-stringr (1.1.0-1) UNRELEASED; urgency=medium
   * Canonical homepage for CRAN
   * DEP5
   * Removed Carlos Borroto from Uploaders
+  * d/watch: version=4
+  * Add autopkgtest
 
  -- Andreas Tille <tille at debian.org>  Sat, 12 Nov 2016 00:26:27 +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..dbb103e
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+pkg=r-cran-stringr
+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
diff --git a/debian/watch b/debian/watch
index 88591a3..9855e73 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
-version=3
+version=4
 http://cran.r-project.org/src/contrib/stringr_([-0-9\.]*)\.tar\.gz
 

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



More information about the debian-med-commit mailing list