mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
tests: 'guix-gc.sh' passes even when 'out' or 'drv' are defined as env vars.
This fixes a test failure exhibited by
fb17a89912
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.
This commit is contained in:
parent
6b7490b340
commit
ff23b47dbe
1 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
# GNU Guix --- Functional package management for GNU
|
# GNU Guix --- Functional package management for GNU
|
||||||
# Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
|
# Copyright © 2013, 2015, 2017 Ludovic Courtès <ludo@gnu.org>
|
||||||
#
|
#
|
||||||
# This file is part of GNU Guix.
|
# This file is part of GNU Guix.
|
||||||
#
|
#
|
||||||
|
@ -25,6 +25,14 @@ guix gc --version
|
||||||
trap "rm -f guix-gc-root" EXIT
|
trap "rm -f guix-gc-root" EXIT
|
||||||
rm -f guix-gc-root
|
rm -f guix-gc-root
|
||||||
|
|
||||||
|
# Below we are using 'drv' and 'out' to contain store file names. If 'drv'
|
||||||
|
# and 'out' are environment variables, 'list-runtime-roots' will "see" them
|
||||||
|
# and thus prevent $drv and $out from being garbage-collected. Using 'unset'
|
||||||
|
# allows us to make sure these are truly local shell variables and not
|
||||||
|
# environments variables.
|
||||||
|
unset drv
|
||||||
|
unset out
|
||||||
|
|
||||||
# For some operations, passing extra arguments is an error.
|
# For some operations, passing extra arguments is an error.
|
||||||
for option in "" "-C 500M" "--verify" "--optimize"
|
for option in "" "-C 500M" "--verify" "--optimize"
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in a new issue