From e25234e34b0d2709e8ff06609cedce2b24b50ee8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 10 Oct 2014 14:08:47 +0200 Subject: build: Make sure tests/guix-package.sh doesn't leave anything behind it. Fixes a regression introduced in commit 300868ba. * tests/guix-package.sh: Move 'module_dir' definition to the top, and "rm -rf" it from the top-most 'trap'. Remove second use of 'trap'. --- tests/guix-package.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 9b0e75e6da..e35871f2a2 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -28,10 +28,11 @@ readlink_base () basename `readlink "$1"` } +module_dir="t-guix-package-$$" profile="t-profile-$$" rm -f "$profile" -trap 'rm "$profile" "$profile-"[0-9]* ; rm -rf t-home-'"$$" EXIT +trap 'rm "$profile" "$profile-"[0-9]* ; rm -rf "$module_dir" t-home-'"$$" EXIT # Use `-e' with a non-package expression. if guix package --bootstrap -e +; @@ -257,9 +258,7 @@ guix package -I | head -1 2> "$HOME/err2" test "`cat "$HOME/err1" "$HOME/err2"`" = "" # Make sure '-L' extends the package module search path. -module_dir="t-guix-package-$$" mkdir "$module_dir" -trap "rm -rf $module_dir" EXIT cat > "$module_dir/foo.scm"<