diff options
author | Gavin Howard <gavin@yzena.com> | 2021-07-24 09:47:01 -0600 |
---|---|---|
committer | Gavin Howard <gavin@yzena.com> | 2021-07-24 09:47:01 -0600 |
commit | 2fb7ad36837fe9a7d3ba5c63fd9430221bb0e645 (patch) | |
tree | d5fb2643fe1019d111fbae658086c69b271e0106 /tests | |
parent | 2af403a9fc107f85ee6827603efce9fc11778d6f (diff) | |
download | platform_external_bc-2fb7ad36837fe9a7d3ba5c63fd9430221bb0e645.tar.gz platform_external_bc-2fb7ad36837fe9a7d3ba5c63fd9430221bb0e645.tar.bz2 platform_external_bc-2fb7ad36837fe9a7d3ba5c63fd9430221bb0e645.zip |
Attempt to fix flaky history tests
These have to do with pexpect being flaky, so I changed history.sh to
run the tests three times, and if it succeeds any of those times, the
test passes.
Signed-off-by: Gavin Howard <gavin@yzena.com>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/history.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/history.sh b/tests/history.sh index 52817481..bf25b2ff 100755 --- a/tests/history.sh +++ b/tests/history.sh @@ -72,10 +72,18 @@ fi # Run all of the tests. for i in $(seq "$st" "$idx"); do - printf 'Running %s history test %d...' "$d" "$i" + for j in $(seq 1 3); do - "$py" "$testdir/history.py" "$d" "$i" "$@" - err=$? + printf 'Running %s history test %d...' "$d" "$i" + + "$py" "$testdir/history.py" "$d" "$i" "$@" + err=$? + + if [ "$err" -eq 0 ]; then + break + fi + + done checktest_retcode "$d" "$err" "$d history tests $i" |