Auto merge of #4172 - Eirik0:rpc-test-time-elapsed, r=Eirik0

Show time elapsed when running RPC tests

This adds the time elapsed in seconds to the success/failure message which is printed after each RPC test. This will make it easier to identify tests which take an especially long time to run.
This commit is contained in:
Homu 2019-11-05 12:55:03 -08:00
commit 1d9bc13d76
1 changed files with 3 additions and 2 deletions

View File

@ -120,13 +120,14 @@ function runTestScript
echo -e "=== Running testscript ${testName} ==="
local startTime=$(date +%s)
if eval "$@"
then
successCount=$(expr $successCount + 1)
echo "--- Success: ${testName} ---"
echo "--- Success: ${testName} ($(($(date +%s) - $startTime))s) ---"
else
failures[${#failures[@]}]="$testName"
echo "!!! FAIL: ${testName} !!!"
echo "!!! FAIL: ${testName} ($(($(date +%s) - $startTime))s) !!!"
fi
echo