tests: Remove `t-profile' files on exit.

* tests/guix-package.sh: Use a trap on EXIT to remove profile-related
  files.  Reported by Andreas Enge <andreas@enge.fr>.
This commit is contained in:
Ludovic Courtès 2012-12-12 00:10:32 +01:00
parent 1c67d639d5
commit 7a6548cbae
1 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,8 @@ guix-package --version
profile="t-profile-$$"
rm -f "$profile"
trap 'rm "$profile" "$profile-"[0-9]*' EXIT
guix-package -b -p "$profile" \
-i `guix-build -e '(@@ (distro packages base) %bootstrap-guile)'`
test -L "$profile" && test -L "$profile-1-link"
@ -69,4 +71,3 @@ guix-package -b -i "libsigsegv:lib" -n
# Check whether `--list-available' returns something sensible.
guix-package -A 'gui.*e' | grep guile
rm "$profile" "$profile-"[0-9]*