[med-svn] [r-cran-scales] 01/02: Add autopkgtest
Andreas Tille
tille at debian.org
Wed Jun 18 15:04:52 UTC 2014
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository r-cran-scales.
commit 2f0a2bfa41fd32401df6251cb5d65ab34a695528
Author: Andreas Tille <tille at debian.org>
Date: Wed Jun 18 16:56:59 2014 +0200
Add autopkgtest
---
debian/README.test | 8 ++++++++
debian/docs | 3 +++
debian/tests/control | 3 +++
debian/tests/run-unit-test | 11 +++++++++++
4 files changed, 25 insertions(+)
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/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..4ec3b0a
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+pkg=r-cran-scales
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
+gunzip -r *
+LC_ALL=C R --no-save < test-all.R
+rm -fr $ADTTMP/*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-scales.git
More information about the debian-med-commit
mailing list