[r-cran-sp] 21/21: New upstream version, add autopkgtest

Sébastien Villemot sebastien at debian.org
Thu Nov 16 21:48:12 UTC 2017


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

sebastien pushed a commit to annotated tag debian/1.0-15-1
in repository r-cran-sp.

commit 8adb95e73f30dc3e113910930ce6d06afd98f9b1
Author: Andreas Tille <tille at debian.org>
Date:   Fri Jun 20 14:02:31 2014 +0000

    New upstream version, add autopkgtest
---
 README.test         |  7 ++++---
 changelog           |  8 ++++++++
 control             |  6 +++---
 docs                |  2 ++
 tests/control       |  3 +++
 tests/run-unit-test | 42 ++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 62 insertions(+), 6 deletions(-)

diff --git a/README.test b/README.test
index 4de616b..55a9142 100644
--- a/README.test
+++ b/README.test
@@ -1,7 +1,8 @@
 Notes on how this package can be tested.
 ────────────────────────────────────────
 
-This package can be tested by loading it into R with the command
-‘library(sp)’ in order to confirm its integrity.
+To run the unit tests provided by the package you can do
 
- -- Andreas Tille <tille at debian.org>  Thu, 20 May 2010 15:43:36 +0200
+   sh  run-unit-test
+
+in this directory.
diff --git a/changelog b/changelog
index cfde713..eb4aed4 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,11 @@
+r-cran-sp (1:1.0-15-1) unstable; urgency=medium
+
+  * New upstream version
+  * cme fix dpkg-control
+  * add autopkgtest
+
+ -- Andreas Tille <tille at debian.org>  Fri, 20 Jun 2014 15:43:36 +0200
+
 r-cran-sp (1:1.0-9-1) unstable; urgency=low
 
   * Team upload.
diff --git a/control b/control
index 7596810..6dcf19e 100644
--- a/control
+++ b/control
@@ -3,11 +3,12 @@ Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.
 Uploaders: Andreas Tille <tille at debian.org>
 Section: gnu-r
 Priority: optional
+Testsuite: autopkgtest
 Build-Depends: debhelper (>= 9),
                cdbs,
-               r-base-dev (>= 2.14.0),
+               r-base-dev,
                r-cran-lattice
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
 Vcs-Browser: http://anonscm.debian.org/viewvc/debian-science/packages/R/r-cran-sp/trunk/
 Vcs-Svn: svn://anonscm.debian.org/debian-science/packages/R/r-cran-sp/trunk/ 
 Homepage: http://rspatial.r-forge.r-project.org/
@@ -26,4 +27,3 @@ Description: GNU R classes and methods for spatial data
  3D data.  Utility functions are provided, e.g. for plotting data as maps,
  spatial selection, as well as methods for retrieving coordinates, for
  subsetting, print, summary, etc. 
-
diff --git a/docs b/docs
index 50f6656..3adf0d6 100644
--- a/docs
+++ b/docs
@@ -1 +1,3 @@
 debian/README.test
+debian/tests/run-unit-test
+tests
diff --git a/tests/control b/tests/control
new file mode 100644
index 0000000..25377fc
--- /dev/null
+++ b/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, r-cran-runit
+Restrictions: allow-stderr
diff --git a/tests/run-unit-test b/tests/run-unit-test
new file mode 100644
index 0000000..ea08e53
--- /dev/null
+++ b/tests/run-unit-test
@@ -0,0 +1,42 @@
+#!/bin/sh -e
+
+pkg=r-cran-sp
+
+# The saved result files do contain some differences in metadata and we also
+# need to ignore version differences of R
+filter() {
+    grep -v -e '^R version' \
+        -e '^Copyright (C)' \
+        -e '^R : Copyright 20' \
+        -e '^Version 2.0' \
+        -e '^Platform:' \
+        -e '^ISBN 3-900051-07-0' \
+        -e '^\[1\] "L*C' \
+        -e '^During startup - Warning messages:' \
+        -e '^[0-9]: Setting LC_' \
+        -e "'help.start()' for an* HTML browser interface to help." \
+       $1 | \
+    sed '/^> *proc\.time()$/,$d'
+}
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp /usr/share/doc/${pkg}/tests/* $ADTTMP
+gunzip *.gz
+for htest in `ls *.R | sed 's/\.R$//'` ; do
+   LC_ALL=C R --no-save < ${htest}.R 2>&1 | tee > ${htest}.Rout
+   filter ${htest}.Rout.save > ${htest}.Rout.save_
+   filter ${htest}.Rout > ${htest}.Rout_
+   diff -u ${htest}.Rout.save_ ${htest}.Rout_
+   if [ ! $? ] ; then
+     echo "Test ${htest} failed"
+     exit 1
+   else
+     echo "Test ${htest} passed"
+   fi
+done
+rm -f $ADTTMP/*
+
+exit 0

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



More information about the debian-science-commits mailing list