[pbuilder] 03/03: t: buildpackage-funcs: move the file to a temporary directory

Mattia Rizzolo mattia at debian.org
Sun Oct 9 17:20:47 UTC 2016


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

mattia pushed a commit to branch master
in repository pbuilder.

commit 76c833be21521d665119a2ec348f4579b05b6af6
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sun Oct 9 16:10:32 2016 +0000

    t: buildpackage-funcs: move the file to a temporary directory
    
    Gbp-Dch: Ignore
---
 t/test_pbuilder-buildpackage-funcs | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/t/test_pbuilder-buildpackage-funcs b/t/test_pbuilder-buildpackage-funcs
index a49ad62..3053ac1 100755
--- a/t/test_pbuilder-buildpackage-funcs
+++ b/t/test_pbuilder-buildpackage-funcs
@@ -35,8 +35,8 @@ fi
 DEBIAN_CONTROL=""
 
 cleanup() {
-    if [ -n "$DEBIAN_CONTROL" ]; then
-        rm -f "$DEBIAN_CONTROL"
+    if [ -n "${TEMP_DIR:-}" ]; then
+        rm -rf "$TEMP_DIR"
     fi
 }
 
@@ -57,11 +57,12 @@ test_getchangesfilesNormal () {
 
 trap cleanup sigpipe sighup exit
 
-# FIXME move to build dir also because we have to hardoce /tmp/ on the result below
-DEBIAN_CONTROL="$(mktemp)"
+# FIXME move to build dir also because we have to hardoce $TEMP_DIR/ on the result below
+TEMP_DIR="$(mktemp -d)"
+DEBIAN_CONTROL="$(mktemp -p "$TEMP_DIR")"
 
-expect_output "$DEBIAN_CONTROL /tmp/haskell-concrete-typerep_0.1.0.2.orig.tar.gz /tmp/haskell-concrete-typerep_0.1.0.2-2.debian.tar.gz" test_getdscfilesNormal
-expect_output "$DEBIAN_CONTROL /tmp/golang-xmpp-dev_0.0~git20140304.orig.tar.gz /tmp/golang-xmpp-dev_0.0~git20140304-1.debian.tar.xz" test_getdscfilesWithoutNL
-expect_output "$DEBIAN_CONTROL /tmp/pbuilder_0.225.2~bpo8+1.dsc /tmp/pbuilder_0.225.2~bpo8+1.tar.xz /tmp/pbuilder_0.225.2~bpo8+1_all.deb" test_getchangesfilesNormal
+expect_output "$DEBIAN_CONTROL $TEMP_DIR/haskell-concrete-typerep_0.1.0.2.orig.tar.gz $TEMP_DIR/haskell-concrete-typerep_0.1.0.2-2.debian.tar.gz" test_getdscfilesNormal
+expect_output "$DEBIAN_CONTROL $TEMP_DIR/golang-xmpp-dev_0.0~git20140304.orig.tar.gz $TEMP_DIR/golang-xmpp-dev_0.0~git20140304-1.debian.tar.xz" test_getdscfilesWithoutNL
+expect_output "$DEBIAN_CONTROL $TEMP_DIR/pbuilder_0.225.2~bpo8+1.dsc $TEMP_DIR/pbuilder_0.225.2~bpo8+1.tar.xz $TEMP_DIR/pbuilder_0.225.2~bpo8+1_all.deb" test_getchangesfilesNormal
 
 testlib_summary

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git



More information about the Pbuilder-maint mailing list