[med-svn] [r-cran-evaluate] 04/10: Add autopkgtest

Andreas Tille tille at debian.org
Sat Sep 30 08:09:40 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-evaluate.

commit 3e985b709fd92f47736953febc482adcaf76466b
Author: Andreas Tille <tille at debian.org>
Date:   Fri Jun 20 22:09:27 2014 +0000

    Add autopkgtest
---
 debian/README.test         | 13 +++----------
 debian/changelog           |  3 ++-
 debian/control             |  1 +
 debian/docs                |  2 ++
 debian/rules               |  2 ++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 12 ++++++++++++
 7 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/debian/README.test b/debian/README.test
index cfc4698..55a9142 100644
--- a/debian/README.test
+++ b/debian/README.test
@@ -1,15 +1,8 @@
 Notes on how this package can be tested.
 ────────────────────────────────────────
 
-This package can be tested by loading it into R with the command
-‘library(evaluate)’ in order to confirm its integrity.
+To run the unit tests provided by the package you can do
 
-Once the package r-cran-testthat will be available you can run the
-full testsuite via
-
-R --no-save <<EOT
-library(testthat)
-library(evaluate)
-test_package("evaluate")
-EOT
+   sh  run-unit-test
 
+in this directory.
diff --git a/debian/changelog b/debian/changelog
index a58569a..e1bf825 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
-r-cran-evaluate (0.5.5-1) UNRELEASED; urgency=medium
+r-cran-evaluate (0.5.5-1) unstable; urgency=medium
 
   * New upstream version
+  * Add autopkgtest
 
  -- Andreas Tille <tille at debian.org>  Fri, 20 Jun 2014 23:52:57 +0200
 
diff --git a/debian/control b/debian/control
index bbcb709..3f3fa04 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
index 50f6656..3adf0d6 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1 +1,3 @@
 debian/README.test
+debian/tests/run-unit-test
+tests
diff --git a/debian/rules b/debian/rules
index 2fbba2d..c6c5b45 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,3 +1,5 @@
 #!/usr/bin/make -f
 
 include /usr/share/R/debian/r-cran.mk
+
+# DEB_INSTALL_CHANGELOGS_ALL = NEWS
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..92cfde2
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+pkg=r-cran-evaluate
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
+# Make sure we are using C locale to pass all tests
+LC_ALL=C R --no-save < test-all.R
+rm -f $ADTTMP/*

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



More information about the debian-med-commit mailing list