mirror of
https://github.com/NixOS/nix
synced 2025-07-08 19:23:54 +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:
parent
809ca33806
commit
3f80060500
9 changed files with 20 additions and 26 deletions
|
@ -11,7 +11,7 @@ outPath2=$(nix-store -q $drvPath2)
|
|||
drvPath3=$(nix-instantiate simple.nix)
|
||||
outPath3=$(nix-store -r $drvPath3)
|
||||
|
||||
! test -e $outPath3.lock
|
||||
(! test -e $outPath3.lock)
|
||||
touch $outPath3.lock
|
||||
|
||||
rm -f "$NIX_STATE_DIR"/gcroots/foo*
|
||||
|
@ -50,9 +50,9 @@ rm -f "$NIX_STATE_DIR"/gcroots/foo*
|
|||
|
||||
# The collector should have deleted lock files for paths that have
|
||||
# been built previously.
|
||||
! test -e $outPath3.lock
|
||||
(! test -e $outPath3.lock)
|
||||
|
||||
# If we run the collector now, it should delete outPath1/2.
|
||||
nix-collect-garbage
|
||||
! test -e $outPath1
|
||||
! test -e $outPath2
|
||||
(! test -e $outPath1)
|
||||
(! test -e $outPath2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue