[med-svn] [r-cran-rgl] 01/01: Fix autopkgtest

Andreas Tille tille at debian.org
Thu Jun 30 15:37:59 UTC 2016


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

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

commit 0bf109b6904a1f93154151fef5dc4490124d765d
Author: Andreas Tille <tille at debian.org>
Date:   Thu Jun 30 17:37:45 2016 +0200

    Fix autopkgtest
---
 debian/tests/run-unit-test | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
index c15756a..e707265 100644
--- a/debian/tests/run-unit-test
+++ b/debian/tests/run-unit-test
@@ -1,31 +1,16 @@
 #!/bin/sh -e
 
-pkg=r-cran-fields
-
-# 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 '^Spam version .* is loaded.' \
-        $1 | \
-    sed -e '/^> *proc\.time()$/,$d'
-}
+pkg=r-cran-rgl
 
 if [ "$ADTTMP" = "" ] ; then
   ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
 fi
 cd $ADTTMP
 cp /usr/share/doc/${pkg}/tests/* $ADTTMP
-gunzip *.gz
+find . -name "*.gz" -exec gunzip \{\} \;
 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 --ignore-all-space ${htest}.Rout.save_ ${htest}.Rout_
+   LC_ALL=C R --no-save < ${htest}.R
    if [ ! $? ] ; then
      echo "Test ${htest} failed"
      exit 1
@@ -33,6 +18,3 @@ for htest in `ls *.R | sed 's/\.R$//'` ; do
      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-med/r-cran-rgl.git



More information about the debian-med-commit mailing list