[pkg-perl-tools] 01/01: Add support for smoke-cleanup to autopkgtest/scripts/build-deps.d/smoke

Christopher Hoskin christopher.hoskin at gmail.com
Sun Jan 31 15:00:56 UTC 2016


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

grinorcole-guest pushed a commit to branch master
in repository pkg-perl-tools.

commit 9ca4aff1109c259a50dfa69461b47d26c85f26bb
Author: Christopher Hoskin <christopher.hoskin at gmail.com>
Date:   Sun Jan 31 15:00:07 2016 +0000

    Add support for smoke-cleanup to autopkgtest/scripts/build-deps.d/smoke
---
 autopkgtest/scripts/build-deps.d/smoke | 20 +++++++++++++++++++-
 debian/changelog                       |  4 ++++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/autopkgtest/scripts/build-deps.d/smoke b/autopkgtest/scripts/build-deps.d/smoke
index d8406d0..6b5f0c7 100755
--- a/autopkgtest/scripts/build-deps.d/smoke
+++ b/autopkgtest/scripts/build-deps.d/smoke
@@ -1,9 +1,27 @@
 #!/bin/sh
 set -e
 
+cleanup() {
+	cd $PDIR
+
+	#Clean up after smoke-setup
+	cleanup_file=debian/tests/pkg-perl/smoke-cleanup
+	if [ -x $cleanup_file ]
+	then
+	    ( export TDIR; $cleanup_file )
+	fi
+
+	rm -rf $TDIR
+}
+
 TEMP=${ADTTMP:-${TMPDIR:-/tmp}}
 
 TDIR=$(mktemp -d $TEMP/smokeXXXXXX)
+
+PDIR=`pwd`
+
+trap cleanup EXIT
+
 file_list=debian/tests/pkg-perl/smoke-files
 if [ ! -r $file_list ]; then
     # backward compatibility squared for now
@@ -99,6 +117,7 @@ then
     ( export TDIR; $setup_file )
 fi
 
+PDIR=`pwd`
 cd $TDIR
 
 if command -v xvfb-run >/dev/null
@@ -118,4 +137,3 @@ fi
 
 if [ -f test.pl ]; then $XVFB perl ./test.pl; fi 2>&1
 
-rm -rf $TDIR
diff --git a/debian/changelog b/debian/changelog
index 937075f..d4c4efa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,13 @@
 pkg-perl-tools (0.28) UNRELEASED; urgency=medium
 
+  [ Salvatore Bonaccorso ]
   * packagecheck: Use https transport protocol in Vcs-Git URI.
     If a missing Vcs-Git field is found, then add the URI using the https
     transport protocol instead of git.
 
+  [ Christopher Hoskin ]
+  * Add support for smoke-cleanup script. Closes: #813307
+
  -- Salvatore Bonaccorso <carnil at debian.org>  Sat, 30 Jan 2016 17:58:15 +0100
 
 pkg-perl-tools (0.27) unstable; urgency=medium

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git



More information about the Pkg-perl-cvs-commits mailing list