1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-10 08:53:55 +02:00

* Test nix-build. This also tests indirect roots.

This commit is contained in:
Eelco Dolstra 2006-03-01 13:49:12 +00:00
parent 8cd646b6af
commit 5cb6c42088
5 changed files with 24 additions and 4 deletions

17
tests/nix-build.sh Normal file
View file

@ -0,0 +1,17 @@
source common.sh
$nixstore --gc
(cd $TEST_ROOT && $NIX_BIN_DIR/nix-build ../dependencies.nix)
test "$(cat $TEST_ROOT/result/foobar)" = FOOBAR
# The result should be retained by a GC.
target=$(ls -l $TEST_ROOT/result | sed 's/.*->\ //')
echo target is $target
$nixstore --gc
test -e $target/foobar
# But now it should be gone.
rm $TEST_ROOT/result
$nixstore --gc
if test -e $target/foobar; then false; fi