[med-svn] r19574 - in trunk/packages/R/r-cran-crayon/trunk/debian: . tests
Andreas Tille
tille at moszumanska.debian.org
Wed Jul 8 17:39:32 UTC 2015
Author: tille
Date: 2015-07-08 17:39:32 +0000 (Wed, 08 Jul 2015)
New Revision: 19574
Added:
trunk/packages/R/r-cran-crayon/trunk/debian/README.test
trunk/packages/R/r-cran-crayon/trunk/debian/docs
trunk/packages/R/r-cran-crayon/trunk/debian/tests/
trunk/packages/R/r-cran-crayon/trunk/debian/tests/control
trunk/packages/R/r-cran-crayon/trunk/debian/tests/run-unit-test
Log:
Add unit tests
Added: trunk/packages/R/r-cran-crayon/trunk/debian/README.test
===================================================================
--- trunk/packages/R/r-cran-crayon/trunk/debian/README.test (rev 0)
+++ trunk/packages/R/r-cran-crayon/trunk/debian/README.test 2015-07-08 17:39:32 UTC (rev 19574)
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test:
+
+ sh ./run-unit-test
+
+in order to confirm its integrity.
Added: trunk/packages/R/r-cran-crayon/trunk/debian/docs
===================================================================
--- trunk/packages/R/r-cran-crayon/trunk/debian/docs (rev 0)
+++ trunk/packages/R/r-cran-crayon/trunk/debian/docs 2015-07-08 17:39:32 UTC (rev 19574)
@@ -0,0 +1,3 @@
+tests
+debian/README.test
+debian/tests/run-unit-test
Added: trunk/packages/R/r-cran-crayon/trunk/debian/tests/control
===================================================================
--- trunk/packages/R/r-cran-crayon/trunk/debian/tests/control (rev 0)
+++ trunk/packages/R/r-cran-crayon/trunk/debian/tests/control 2015-07-08 17:39:32 UTC (rev 19574)
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, r-cran-testthat
+Restrictions: allow-stderr
Added: trunk/packages/R/r-cran-crayon/trunk/debian/tests/run-unit-test
===================================================================
--- trunk/packages/R/r-cran-crayon/trunk/debian/tests/run-unit-test (rev 0)
+++ trunk/packages/R/r-cran-crayon/trunk/debian/tests/run-unit-test 2015-07-08 17:39:32 UTC (rev 19574)
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+
+pkg=r-cran-crayon
+
+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 \{\} \;
+# Make sure we are using C locale to pass all tests
+LC_ALL=C R --no-save < testthat.R
+rm -rf $ADTTMP/*
More information about the debian-med-commit
mailing list