[med-svn] [r-cran-plyr] 04/04: Add unit test. Unfortunately one error remains

Andreas Tille tille at debian.org
Fri Jun 20 17:03:38 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-plyr.

commit 4429ae5adf91559451767e3494f78a5453492216
Author: Andreas Tille <tille at debian.org>
Date:   Fri Jun 20 19:03:17 2014 +0200

    Add unit test.  Unfortunately one error remains
---
 debian/README.test         |  8 ++++++++
 debian/changelog           |  2 ++
 debian/docs                |  3 +++
 debian/rules               |  2 +-
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 10 ++++++++++
 6 files changed, 27 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 d964778..ad5dd86 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ r-cran-plyr (1.8.1-1) UNRELEASED; urgency=medium
   [ Andreas Tille ]
   * Fix some lintian issues
   * Recommends: r-cran-domc (since used in unit test)
+  * Add unit test
+  TODO: Clarify error in unit test with upstream
 
  -- Andreas Tille <tille at debian.org>  Fri, 20 Jun 2014 18:51:08 +0200
 
diff --git a/debian/docs b/debian/docs
index 8913f46..8897e68 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1,2 +1,5 @@
 NEWS
 README.md
+debian/README.test
+debian/tests/run-unit-test
+tests
diff --git a/debian/rules b/debian/rules
index 78b83c5..3de342c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,4 +4,4 @@ include /usr/share/R/debian/r-cran.mk
 
 install/$(package)::
 	rm -rf debian/$(package)/usr/lib/R/site-library/$(cranName)/LICENSE
-	chmod -x debian/$(package)usr/lib/R/site-library/$(cranName)/tests/test-rbind.matrix.r
+	chmod -x debian/$(package)/usr/lib/R/site-library/$(cranName)/tests/test-rbind.matrix.r
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..ca65d51
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, r-cran-testthat, r-cran-domc
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..a69ded8
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+pkg=r-cran-plyr
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp /usr/share/doc/${pkg}/tests/* $ADTTMP
+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-plyr.git



More information about the debian-med-commit mailing list