aboutsummaryrefslogtreecommitdiff
path: root/tests/gc.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01 13:25:08 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01 13:25:08 +0000
commite48bd8c8b50e48db297e49fb325a94e854d6bdad (patch)
tree87bb3798180f9e098257266623ab23fdf1a9cd0f /tests/gc.sh
parent458820df6cb976e0642c67ca775d8e7095c091f2 (diff)
* Add a test for nix-log2xml.
Diffstat (limited to 'tests/gc.sh')
-rw-r--r--tests/gc.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gc.sh b/tests/gc.sh
index afbda953e..36b09593d 100644
--- a/tests/gc.sh
+++ b/tests/gc.sh
@@ -4,7 +4,8 @@ drvPath=$($nixinstantiate dependencies.nix)
outPath=$($nixstore -rvv "$drvPath")
# Set a GC root.
-ln -s $outPath "$NIX_STATE_DIR"/gcroots/foo
+rm -f "$NIX_STATE_DIR"/gcroots/foo
+ln -sf $outPath "$NIX_STATE_DIR"/gcroots/foo
$NIX_BIN_DIR/nix-collect-garbage
@@ -14,3 +15,5 @@ cat $outPath/input-2/bar
# Check that the derivation has been GC'd.
if cat $drvPath > /dev/null; then false; fi
+
+rm "$NIX_STATE_DIR"/gcroots/foo