[r-cran-tm] 06/07: Add new "run-unit-test" test.

Sébastien Villemot sebastien at debian.org
Mon Nov 20 10:53:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

sebastien pushed a commit to branch master
in repository r-cran-tm.

commit f70fcef86cba8326948a4f2de2cb7d36e41eea85
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Mon Nov 20 11:47:48 2017 +0100

    Add new "run-unit-test" test.
---
 debian/r-cran-tm.docs      |  2 ++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 17 +++++++++++++++++
 3 files changed, 22 insertions(+)

diff --git a/debian/r-cran-tm.docs b/debian/r-cran-tm.docs
new file mode 100644
index 0000000..67ce40b
--- /dev/null
+++ b/debian/r-cran-tm.docs
@@ -0,0 +1,2 @@
+debian/tests/run-unit-test
+tests
diff --git a/debian/tests/control b/debian/tests/control
index 22b7801..0ff3890 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -2,4 +2,7 @@ Tests: vignette
 Depends: @, r-cran-snowballc
 Restrictions: allow-stderr
 
+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..be22b8e
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+pkgname=tm
+debname=r-cran-tm
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+    AUTOPKGTEST_TMP=`mktemp -d /tmp/${debname}-test.XXXXXX`
+    trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+cd $AUTOPKGTEST_TMP
+cp -a /usr/share/doc/$debname/tests/* $AUTOPKGTEST_TMP
+gunzip -r *
+for testfile in *.R; do
+    echo "BEGIN TEST $testfile"
+    LC_ALL=C R --no-save < $testfile
+done
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-tm.git



More information about the debian-science-commits mailing list