summaryrefslogtreecommitdiff
path: root/tests/guix-gc.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-11-13 09:58:47 +0100
committerLudovic Courtès <ludo@gnu.org>2017-11-13 10:10:13 +0100
commitff23b47dbee038236386ddc2ed2fff4c77ad3aa1 (patch)
treed2dcec3dc3fc66f3e0c6276e8586f10ef208eb69 /tests/guix-gc.sh
parent6b7490b3404bcb3f04689e0eb61ef3b5e65aedde (diff)
tests: 'guix-gc.sh' passes even when 'out' or 'drv' are defined as env vars.
This fixes a test failure exhibited by fb17a89912c2a3738dae716e30481c11e1c6f0ac whereby assignments to 'out' in guix-gc.sh would go to the 'out' environment variable, when it exists, which in turn prevents garbage collection of $out. * tests/guix-gc.sh: Add 'unset' invocations.
Diffstat (limited to 'tests/guix-gc.sh')
-rw-r--r--tests/guix-gc.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/guix-gc.sh b/tests/guix-gc.sh
index a100f186f51..57c5e7dd616 100644
--- a/tests/guix-gc.sh
+++ b/tests/guix-gc.sh
@@ -1,5 +1,5 @@
1# GNU Guix --- Functional package management for GNU 1# GNU Guix --- Functional package management for GNU
2# Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org> 2# Copyright © 2013, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
3# 3#
4# This file is part of GNU Guix. 4# This file is part of GNU Guix.
5# 5#
@@ -25,6 +25,14 @@ guix gc --version
25trap "rm -f guix-gc-root" EXIT 25trap "rm -f guix-gc-root" EXIT
26rm -f guix-gc-root 26rm -f guix-gc-root
27 27
28# Below we are using 'drv' and 'out' to contain store file names. If 'drv'
29# and 'out' are environment variables, 'list-runtime-roots' will "see" them
30# and thus prevent $drv and $out from being garbage-collected. Using 'unset'
31# allows us to make sure these are truly local shell variables and not
32# environments variables.
33unset drv
34unset out
35
28# For some operations, passing extra arguments is an error. 36# For some operations, passing extra arguments is an error.
29for option in "" "-C 500M" "--verify" "--optimize" 37for option in "" "-C 500M" "--verify" "--optimize"
30do 38do