1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 19:23:54 +02:00

* 1000th revision!

* A test to verify that locking of output paths (caused by concurrent
  invocations of Nix) works correctly.
This commit is contained in:
Eelco Dolstra 2004-05-04 13:56:30 +00:00
parent a7bbe73971
commit f044ccf702
4 changed files with 50 additions and 2 deletions

17
tests/locking.sh Normal file
View file

@ -0,0 +1,17 @@
storeExpr=$($TOP/src/nix-instantiate/nix-instantiate locking.nix)
echo "store expr is $storeExpr"
for i in $(seq 1 5); do
echo "WORKER $i"
$TOP/src/nix-store/nix-store -rvvB "$storeExpr" &
done
sleep 5
outPath=$($TOP/src/nix-store/nix-store -qnfvvvvv "$storeExpr")
echo "output path is $outPath"
text=$(cat "$outPath")
if test "$text" != "aabcade"; then exit 1; fi