diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-03-23 15:16:36 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2009-03-23 15:16:36 +0000 |
commit | 7aedcf946043468c169ab9b0a131be908804789b (patch) | |
tree | 0921d12c8b39d1fb6ec65c90098433ea2068cfec /tests/parallel.sh | |
parent | 3a87163b2480eaf47d626580d20049387d942066 (diff) | |
download | guix-7aedcf946043468c169ab9b0a131be908804789b.tar.gz |
* Make this test a bit more robust. It's still timing dependent
though.
Diffstat (limited to 'tests/parallel.sh')
-rw-r--r-- | tests/parallel.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/parallel.sh b/tests/parallel.sh index 26411649d1..798c15f5b4 100644 --- a/tests/parallel.sh +++ b/tests/parallel.sh @@ -25,21 +25,23 @@ clearStore rm -f $SHARED.cur $SHARED.max -$nixbuild -j1 parallel.nix & +cmd="$nixbuild -j1 parallel.nix --argstr sleepTime 7" + +$cmd & pid1=$! echo "pid 1 is $pid1" -$nixbuild -j1 parallel.nix & +$cmd & pid2=$! echo "pid 2 is $pid2" -$nixbuild -j1 parallel.nix & +$cmd & pid3=$! echo "pid 3 is $pid3" -wait $pid1 -wait $pid2 -wait $pid3 +wait $pid1 || fail "instance 1 failed: $?" +wait $pid2 || fail "instance 2 failed: $?" +wait $pid3 || fail "instance 3 failed: $?" if test "$(cat $SHARED.cur)" != 0; then fail "wrong current process count"; fi if test "$(cat $SHARED.max)" != 3; then fail "not enough parallelism"; fi |