diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-05-04T13·56+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-05-04T13·56+0000 |
commit | f044ccf7025137ec541e165e7988772f27080a23 (patch) | |
tree | 90a3215c4c66682841ba628467e1863e20416fa8 /tests/locking.sh | |
parent | a7bbe739717c7419a374b29e6e4887325b1af7fd (diff) |
* 1000th revision!
* A test to verify that locking of output paths (caused by concurrent invocations of Nix) works correctly.
Diffstat (limited to 'tests/locking.sh')
-rw-r--r-- | tests/locking.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/locking.sh b/tests/locking.sh new file mode 100644 index 000000000000..5728aee93727 --- /dev/null +++ b/tests/locking.sh @@ -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 |