[r-cran-learnbayes] 05/15: Add autopkgtest based on vignettes

Andreas Tille tille at debian.org
Thu Nov 9 15:55:36 UTC 2017


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

tille pushed a commit to branch master
in repository r-cran-learnbayes.

commit 1c0143a9d7fd40aec795b1228427df25d51487c6
Author: Andreas Tille <tille at debian.org>
Date:   Thu Aug 14 09:37:48 2014 +0000

    Add autopkgtest based on vignettes
---
 debian/README.test         |  8 ++++++++
 debian/changelog           |  3 ++-
 debian/control             |  1 +
 debian/docs                |  2 ++
 debian/examples            |  1 +
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 18 ++++++++++++++++++
 7 files changed, 35 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 28a06bd..edd1909 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
-r-cran-learnbayes (2.15-2) UNRELEASED; urgency=medium
+r-cran-learnbayes (2.15-2) unstable; urgency=medium
 
   * Fix Vcs fields
+  * Add autopkgtest based on vignettes
 
  -- Andreas Tille <tille at debian.org>  Thu, 14 Aug 2014 11:27:59 +0200
 
diff --git a/debian/control b/debian/control
index 0ce81a4..b6bee64 100644
--- a/debian/control
+++ b/debian/control
@@ -1,6 +1,7 @@
 Source: r-cran-learnbayes
 Section: gnu-r
 Priority: optional
+Testsuite: autopkgtest
 Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Andreas Tille <tille at debian.org>
 Build-Depends: debhelper (>= 9.0),
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..9a4f4f8
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+debian/README.test
+debian/tests/run-unit-test
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..18244c8
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+vignettes
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+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..7e4705a
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+oname=LearnBayes
+pkg=r-cran-`echo $oname | tr [A-Z] [a-z]`
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp /usr/share/doc/$pkg/examples/vignettes/* $ADTTMP
+gunzip *.gz
+for rnw in `ls *.[rR]nw` ; do
+rfile=`echo $rnw | sed 's/\.[rR]nw/.R/'`
+R --no-save <<EOT
+  Stangle("$rnw")
+  source("$rfile", echo=TRUE)
+EOT
+done
+rm -rf *

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



More information about the debian-science-commits mailing list