1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

Fix tests

So all these years I was totally deluded about the meaning of "set
-e". You might think that it causes statements like "false && true" or
"! true" to fail, but it doesn't...
This commit is contained in:
Eelco Dolstra 2014-08-21 21:50:19 +02:00
parent 809ca33806
commit 3f80060500
9 changed files with 20 additions and 26 deletions

View file

@ -18,7 +18,7 @@ grep -q 'multiple-outputs-b.drv",\["out"\]' $drvPath
outPath=$(nix-build multiple-outputs.nix -A d --no-out-link)
drvPath=$(cat $outPath/drv)
outPath=$(nix-store -q $drvPath)
! [ -e "$outPath" ]
(! [ -e "$outPath" ])
# Do a build of something that depends on a derivation with multiple
# outputs.
@ -30,7 +30,7 @@ echo "output path is $outPath"
# Test nix-build on a derivation with multiple outputs.
nix-build multiple-outputs.nix -A a -o $TEST_ROOT/result
[ -e $TEST_ROOT/result-first ]
! [ -e $TEST_ROOT/result-second ]
(! [ -e $TEST_ROOT/result-second ])
nix-build multiple-outputs.nix -A a.all -o $TEST_ROOT/result
[ "$(cat $TEST_ROOT/result-first/file)" = "first" ]
[ "$(cat $TEST_ROOT/result-second/file)" = "second" ]