[r-cran-jsonlite] 06/07: Add autopkgtest

Andreas Tille tille at debian.org
Wed Nov 16 09:16:47 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-jsonlite.

commit 46196e218774365ad4e6c173e20e44c2b26d78b6
Author: Andreas Tille <tille at debian.org>
Date:   Wed Nov 16 10:12:32 2016 +0100

    Add autopkgtest
---
 debian/README.test         |  9 +++++++++
 debian/changelog           |  1 +
 debian/docs                |  3 +++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 12 ++++++++++++
 5 files changed, 28 insertions(+)

diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..8d70ca3
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,9 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test:
+
+cd tests
+LC_ALL=C R --no-save < testthat.R
+
+in order to confirm its integrity.
diff --git a/debian/changelog b/debian/changelog
index 52e60aa..633482d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ r-cran-jsonlite (1.1-1) UNRELEASED; urgency=medium
   * Convert to dh-r
   * Canonical homepage for CRAN
   * d/watch: version=4
+  * Add autopkgtest
 
  -- Andreas Tille <tille at debian.org>  Wed, 16 Nov 2016 09:42:13 +0100
 
diff --git a/debian/docs b/debian/docs
index edc0071..5370e71 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1 +1,4 @@
 NEWS
+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..db28313
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+oname=httr
+pkg=r-cran-`echo $oname | tr [A-Z] [a-z]`
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
+LC_ALL=C R --no-save < testthat.R
+rm -fr $ADTTMP/*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-jsonlite.git



More information about the debian-science-commits mailing list