summaryrefslogtreecommitdiff
path: root/tests/guix-gc.sh
diff options
context:
space:
mode:
authorCyrill Schenkel <cyrill.schenkel@gmail.com>2015-05-24 14:04:15 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-26 22:26:01 +0200
commitcdb5b075d545dd4e0b2a03bdc62fa0d1f6e00fc3 (patch)
tree45acbdd1be71153881dc51c76e9ae6006547e026 /tests/guix-gc.sh
parent9aafbc0c1382ab78059804eb16b0900fd3b10ee4 (diff)
gc: ignore trailing slash or subdirectories for `guix gc -d'
Fixes <http://bugs.gnu.org/19757>. * guix/scripts/gc.scm (guix-gc): Convert paths to direct store paths. * guix/store.scm (direct-store-path): Get rid of subdirectories in store path. * tests/guix-gc.sh: New tests. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests/guix-gc.sh')
-rw-r--r--tests/guix-gc.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/guix-gc.sh b/tests/guix-gc.sh
index eac9d82e898..c1eb66cef53 100644
--- a/tests/guix-gc.sh
+++ b/tests/guix-gc.sh
@@ -64,3 +64,23 @@ guix gc -C 1KiB
64# Check trivial error cases. 64# Check trivial error cases.
65if guix gc --delete /dev/null; 65if guix gc --delete /dev/null;
66then false; else true; fi 66then false; else true; fi
67
68# Bug #19757
69out="`guix build guile-bootstrap`"
70test -d "$out"
71
72guix gc --delete "$out"
73
74! test -d "$out"
75
76out="`guix build guile-bootstrap`"
77test -d "$out"
78
79guix gc --delete "$out/"
80
81! test -d "$out"
82
83out="`guix build guile-bootstrap`"
84test -d "$out"
85
86guix gc --delete "$out/bin/guile"