diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-04-11 16:47:46 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-04-11 16:47:46 -0700 |
commit | 0993141334a08697351fc7900473f46b0d092216 (patch) | |
tree | b0d16a5aea7d863cfb3737b609c259473b0c38f7 /tests | |
parent | 46840ae3753bb48fd6042b6e140ae1271dc84fdc (diff) |
retry flakey tests on failure
Fixes #2926
Diffstat (limited to 'tests')
-rw-r--r-- | tests/interactive.fish | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/interactive.fish b/tests/interactive.fish index 9e0d344f..76b0562e 100644 --- a/tests/interactive.fish +++ b/tests/interactive.fish @@ -4,6 +4,9 @@ # should be running it via `make test` to ensure the environment is properly # setup. +# This is a list of flakey tests that often succeed when rerun. +set TESTS_TO_RETRY bind.expect + # Change to directory containing this script cd (dirname (status -f)) @@ -69,10 +72,19 @@ function test_file end end -set -l failed +set failed for i in $files_to_test if not test_file $i - set failed $failed $i + # Retry flakey tests once. + if contains $i $TESTS_TO_RETRY + say -o cyan "Rerunning test $i since it is known to be flakey" + rm -f $i.tmp.* + if not test_file $i + set failed $failed $i + end + else + set failed $failed $i + end end end |