Add a test for --check / --repeat

This commit is contained in:
Eelco Dolstra 2018-01-19 13:58:28 +01:00
parent 0c95776c3e
commit 87e3d142cc
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 32 additions and 1 deletions

18
tests/check.sh Normal file
View file

@ -0,0 +1,18 @@
source common.sh
clearStore
nix-build dependencies.nix --no-out-link
nix-build dependencies.nix --no-out-link --check
nix-build check.nix -A nondeterministic --no-out-link
(! nix-build check.nix -A nondeterministic --no-out-link --check 2> $TEST_ROOT/log)
grep 'may not be deterministic' $TEST_ROOT/log
clearStore
nix-build dependencies.nix --no-out-link --repeat 3
(! nix-build check.nix -A nondeterministic --no-out-link --repeat 1 2> $TEST_ROOT/log)
grep 'differs from previous round' $TEST_ROOT/log