[med-svn] [r-cran-r.methodss3] 04/09: Add autopkg test

Andreas Tille tille at debian.org
Fri Oct 20 09:58:26 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-r.methodss3.

commit fcff9fac85d602c22417d2477052c499a4b75605
Author: Andreas Tille <tille at debian.org>
Date:   Sat Jul 4 10:02:26 2015 +0000

    Add autopkg test
---
 debian/README.test         |  7 +++++--
 debian/changelog           |  1 +
 debian/docs                |  2 ++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 16 ++++++++++++++++
 5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/debian/README.test b/debian/README.test
index 24c7c3a..53fb4d7 100644
--- a/debian/README.test
+++ b/debian/README.test
@@ -1,5 +1,8 @@
 Notes on how this package can be tested.
 ────────────────────────────────────────
 
-This package can be tested by loading it into R with the command
-‘library(R.methodsS3)’ in order to confirm its integrity.
+This package can be tested by running the provided test:
+
+   sh ./run-unit-test
+
+in order to confirm its integrity.
diff --git a/debian/changelog b/debian/changelog
index a22938c..02db443 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ r-cran-r.methodss3 (1.7.0-1) UNRELEASED; urgency=medium
 
   * New upstream version
   * cme fix dpkg-control
+  * Add autopkg test
 
  -- Andreas Tille <tille at debian.org>  Sat, 04 Jul 2015 11:39:11 +0200
 
diff --git a/debian/docs b/debian/docs
index 50f6656..960011c 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1 +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..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..b494cdb
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,16 @@
+#!/bin/sh -e
+
+oname=R.methodsS3
+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
+find . -name "*.gz" -exec gunzip \{\} \;
+for rfile in *.[rR] ; do
+  R CMD BATCH $rfile
+done
+rm -fr $ADTTMP/*
+

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



More information about the debian-med-commit mailing list