[r-cran-bradleyterry2] 08/14: Add autopkgtest unit tests.

Sébastien Villemot sebastien at debian.org
Sat Sep 30 21:12:38 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-bradleyterry2.

commit a583008c7bd40fea46a0468c60c1215f186b266a
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Sat Sep 30 22:58:49 2017 +0200

    Add autopkgtest unit tests.
---
 debian/r-cran-bradleyterry2.docs |  2 ++
 debian/tests/control             |  5 +++++
 debian/tests/run-unit-test       | 17 +++++++++++++++++
 3 files changed, 24 insertions(+)

diff --git a/debian/r-cran-bradleyterry2.docs b/debian/r-cran-bradleyterry2.docs
new file mode 100644
index 0000000..67ce40b
--- /dev/null
+++ b/debian/r-cran-bradleyterry2.docs
@@ -0,0 +1,2 @@
+debian/tests/run-unit-test
+tests
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d6849ad
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,5 @@
+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..9a7f18b
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+pkgname=BradleyTerry2
+debname=r-cran-bradleyterry2
+
+if [ "$ADTTMP" = "" ] ; then
+    ADTTMP=`mktemp -d /tmp/${debname}-test.XXXXXX`
+    trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/$debname/tests/* $ADTTMP
+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-bradleyterry2.git



More information about the debian-science-commits mailing list