1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-09 03:43:54 +02:00

tests/check.sh: Fix a race

Fixes this random failure:

    error: hash mismatch in fixed-output derivation '/tmp/nix-shell.EUgAVU/nix-test/tests/check/store/sfps3l3c5n7dabpx34kigxnfhmrwk2h6-dummy.drv':
             specified: sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
                got:    sha256-0qhPS4tlCTfsj3PNi+LHSt1akRumTfJ0WO2CKdqASiY=

which happens because multiple tests were writing to ./dummy.
This commit is contained in:
Eelco Dolstra 2021-07-07 10:48:47 +02:00
parent 2c853e2a58
commit 02dd6bb610
3 changed files with 5 additions and 4 deletions

View file

@ -9,7 +9,7 @@ echo $path2
if test "$path1" != "$path2"; then
echo "nix-store --add and --add-fixed mismatch"
exit 1
fi
fi
path3=$(nix-store --add-fixed sha256 ./dummy)
echo $path3