aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGavin Howard <gavin@yzena.com>2021-07-24 09:47:01 -0600
committerGavin Howard <gavin@yzena.com>2021-07-24 09:47:01 -0600
commit2fb7ad36837fe9a7d3ba5c63fd9430221bb0e645 (patch)
treed5fb2643fe1019d111fbae658086c69b271e0106 /tests
parent2af403a9fc107f85ee6827603efce9fc11778d6f (diff)
downloadplatform_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-xtests/history.sh14
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"