diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-01-27 17:48:50 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-01-27 17:48:50 +0000 |
commit | e5c16c95829f4f14763ba1f66f6e26f5f1792b29 (patch) | |
tree | 801594a055a1c762a93b4b1ef3406148594b4eff /tests/gc.sh | |
parent | 8a3eef22e38136513370f0dfb3cf7866ec2abaa3 (diff) | |
download | guix-e5c16c95829f4f14763ba1f66f6e26f5f1792b29.tar.gz |
* Add missing substitutes files to dist.
* Add a garbage collector test.
Diffstat (limited to 'tests/gc.sh')
-rw-r--r-- | tests/gc.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/gc.sh b/tests/gc.sh new file mode 100644 index 0000000000..9aeda43e71 --- /dev/null +++ b/tests/gc.sh @@ -0,0 +1,14 @@ +storeExpr=$($TOP/src/nix-instantiate/nix-instantiate dependencies.nix) +outPath=$($TOP/src/nix-store/nix-store -rvv "$storeExpr") + +# Set a GC root. +ln -s $outPath "$NIX_LOCALSTATE_DIR"/nix/gcroots/foo + +$NIX_BIN_DIR/nix-collect-garbage + +# Check that the root and its dependencies haven't been deleted. +cat $outPath/foobar +cat $outPath/input-2/bar + +# Check that the derivation has been GC'd. +if cat $storeExpr > /dev/null; then false; fi |