test: shell: Improve load test

This might have failed once in travis because of a short timeout.
Hopefully if this happens again, we'll now know why.
This commit is contained in:
James Shubin
2019-02-24 13:36:57 -05:00
parent 5e38c1c8fe
commit d88874845c

View File

@@ -36,13 +36,13 @@ file "${tmpdir}/loadavg" {
} }
EOF EOF
$TIMEOUT "$MGMT" run --tmp-prefix --converged-timeout=5 lang --lang "$tmpdir/load0.mcl" & $TIMEOUT "$MGMT" run --tmp-prefix --converged-timeout=15 lang --lang "$tmpdir/load0.mcl" &
pid=$! pid=$!
wait $pid # get exit status wait $pid # get exit status
e=$? e=$?
set +e set +e
egrep "$regex" "$tmpdir/loadavg" || fail_test "Could not match $tmpdir/loadavg to '$regex'." egrep "$regex" "$tmpdir/loadavg" || fail_test "Could not match $tmpdir/loadavg to '$regex'. Got: '`cat $tmpdir/loadavg`'."
if [ "$tmpdir" = "" ]; then if [ "$tmpdir" = "" ]; then
echo "BUG, tried to delete empty string path" echo "BUG, tried to delete empty string path"