[r-cran-polycub] 04/18: New upstream version, Add autopkgtest

Andreas Tille tille at debian.org
Fri Oct 20 14:21:49 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-polycub.

commit 1e5c4ad242e1891d8547ca4804d1743cef0ab9d1
Author: Andreas Tille <tille at debian.org>
Date:   Mon Jun 23 14:03:56 2014 +0000

    New upstream version, Add autopkgtest
---
 debian/README.test                    | 27 ++++++++++++---------------
 debian/changelog                      |  7 +++++++
 debian/control                        |  4 +++-
 debian/copyright                      |  8 ++++----
 debian/docs                           |  1 +
 debian/patches/series                 |  1 +
 debian/patches/skip_gpclib_test.patch | 25 +++++++++++++++++++++++++
 debian/tests/control                  |  3 +++
 debian/tests/run-unit-test            | 12 ++++++++++++
 9 files changed, 68 insertions(+), 20 deletions(-)

diff --git a/debian/README.test b/debian/README.test
index ef0dffc..f2fd841 100644
--- a/debian/README.test
+++ b/debian/README.test
@@ -1,24 +1,21 @@
 Notes on how this package can be tested.
 ────────────────────────────────────────
 
-This package can be tested by running the provided test:
+To run the unit tests provided by the package you can do
 
+   sh  run-unit-test
 
-#!/bin/sh -e
-DIR=`mktemp -d`
-cd $DIR
-cp -a /usr/share/doc/r-cran-polycub/tests/* .
-LC_ALL=C R --no-save < test-all.R
-cd ..
-rm -rf $DIR
+in this directory.
 
+One test of the test suite is requiring the gpclib GNU R
+package with non-free license.  It is available from
+  http://cran.r-project.org/web/packages/gpclib/
+and the Debian packaging available from
+  svn://svn.debian.org/debian-science/packages/R/r-cran-gpclib/trunk/
+could be used to create a Debian package from this code.
 
-in order to confirm its integrity.
+Since we can not rely from non-free software the test in question is 
+excluded by a quilt patch in the packaging source.
 
-However, to do this test you also need to install gpclib
+ -- Andreas Tille <tille at debian.org>  Mon, 23 Jun 2014 15:18:25 +0200
 
-   http://cran.r-project.org/web/packages/gpclib/
-
-which is non-free and thus can not be distributet in Debian main.
-
- -- Andreas Tille <tille at debian.org>  Tue, 14 Jan 2014 16:30:53 +0100
diff --git a/debian/changelog b/debian/changelog
index f1e6aa5..465ced6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+r-cran-polycub (0.5-0-1) unstable; urgency=medium
+
+  * New upstream version
+  * Add autopkgtest (skipped gpclib test since gpclib is non-free)
+
+ -- Andreas Tille <tille at debian.org>  Mon, 23 Jun 2014 15:18:25 +0200
+
 r-cran-polycub (0.4-1-1) unstable; urgency=low
 
   * Initial release (Closes: #736509)
diff --git a/debian/control b/debian/control
index 7e89611..cb528db 100644
--- a/debian/control
+++ b/debian/control
@@ -1,6 +1,7 @@
 Source: r-cran-polycub
 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),
@@ -15,8 +16,9 @@ Vcs-Svn: svn://anonscm.debian.org/debian-science/packages/R/trunk/packages/r-cra
 Homepage: http://cran.r-project.org/web/packages/polyCub/
 
 Package: r-cran-polycub
-Architecture: all
+Architecture: any
 Depends: ${misc:Depends},
+         ${shlibs:Depends},
          ${R:Depends},
          r-cran-sp,
          r-cran-spatstat,
diff --git a/debian/copyright b/debian/copyright
index 71b4127..0df2a6f 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,13 +5,13 @@ Source: http://cran.r-project.org/web/packages/polyCub/
 
 Files: *
 Copyright: (C) 2005 - 2013 Sebastian Meyer, Michael Hoehle
-License: GPL2
+License: GPL-2+
 
 Files: debian/*
 Copyright: 2014 Andreas Tille <tille at debian.org>
-License: GPL2
+License: GPL-2+
 
-License: GPL2
+License: GPL-2+
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License.
@@ -26,4 +26,4 @@ License: GPL2
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  .
  On Debian systems, the complete text of the GNU General Public
- License can be found in `/usr/share/common-licenses/GPL'.
+ License can be found in `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/docs b/debian/docs
index 8fe8108..3adf0d6 100644
--- a/debian/docs
+++ b/debian/docs
@@ -1,2 +1,3 @@
 debian/README.test
+debian/tests/run-unit-test
 tests
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2270961
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+skip_gpclib_test.patch
diff --git a/debian/patches/skip_gpclib_test.patch b/debian/patches/skip_gpclib_test.patch
new file mode 100644
index 0000000..2131e68
--- /dev/null
+++ b/debian/patches/skip_gpclib_test.patch
@@ -0,0 +1,25 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 23 Jun 2014 15:18:25 +0200
+Description: One test of the test suite is requiring the gpclib GNU R
+ package with non-free license.  It is available from
+  http://cran.r-project.org/web/packages/gpclib/
+ and the Debian packaging available from
+  svn://svn.debian.org/debian-science/packages/R/r-cran-gpclib/trunk/
+ could be used to create a Debian package from this code.
+ .
+ Since we can not rely from non-free software the test in question is
+ excluded by this patch.
+
+--- a/tests/testthat/test-polyCub.R
++++ b/tests/testthat/test-polyCub.R
+@@ -18,7 +18,9 @@ sd <- 3
+ 
+ ## exact value of the integral over the _polygonal_ circle
+ intExact <- 0.65844436
+-if (requireNamespace("mvtnorm") && gpclibPermit()) {
++# if (requireNamespace("mvtnorm") && gpclibPermit()) {
++# Skip this test since gpclib is non-free
++if ( 0 == 1 ) {
+     ## run this conditionally since gpclib might not be available on all
+     ## platforms (as pointed out by Uwe Ligges, 2014-04-20)
+     test_that("polyCub.exact.Gauss returns validated result", {
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..b044b0c
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+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..db09f19
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+pkg=r-cran-polycub
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/tests/* $ADTTMP
+# Make sure we are using C locale to pass all tests
+LC_ALL=C R --no-save < test-all.R
+rm -rf $ADTTMP/*

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



More information about the debian-science-commits mailing list