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:
parent
8cd646b6af
commit
5cb6c42088
5 changed files with 24 additions and 4 deletions
17
tests/nix-build.sh
Normal file
17
tests/nix-build.sh
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue