diff options
| author | Cyrill Schenkel <cyrill.schenkel@gmail.com> | 2015-05-24 14:04:15 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-05-26 22:26:01 +0200 |
| commit | cdb5b075d545dd4e0b2a03bdc62fa0d1f6e00fc3 (patch) | |
| tree | 45acbdd1be71153881dc51c76e9ae6006547e026 /tests/guix-gc.sh | |
| parent | 9aafbc0c1382ab78059804eb16b0900fd3b10ee4 (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.sh | 20 |
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. |
| 65 | if guix gc --delete /dev/null; | 65 | if guix gc --delete /dev/null; |
| 66 | then false; else true; fi | 66 | then false; else true; fi |
| 67 | |||
| 68 | # Bug #19757 | ||
| 69 | out="`guix build guile-bootstrap`" | ||
| 70 | test -d "$out" | ||
| 71 | |||
| 72 | guix gc --delete "$out" | ||
| 73 | |||
| 74 | ! test -d "$out" | ||
| 75 | |||
| 76 | out="`guix build guile-bootstrap`" | ||
| 77 | test -d "$out" | ||
| 78 | |||
| 79 | guix gc --delete "$out/" | ||
| 80 | |||
| 81 | ! test -d "$out" | ||
| 82 | |||
| 83 | out="`guix build guile-bootstrap`" | ||
| 84 | test -d "$out" | ||
| 85 | |||
| 86 | guix gc --delete "$out/bin/guile" | ||
