summaryrefslogtreecommitdiffstats
path: root/src/testdir/runtest.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-18 19:18:10 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-18 19:18:10 +0100
commit3cdcb090a664e182078f7cc0ca3e4e5a94bbb784 (patch)
tree18d7686880a240523e7177b39d97b5670d73db52 /src/testdir/runtest.vim
parent292b90d4fa11022661f449dd3efb73d5ac737313 (diff)
patch 8.2.0400: not all tests using a terminal are in the list of flaky testsv8.2.0400
Problem: Not all tests using a terminal are in the list of flaky tests. Solution: Introduce the test_is_flaky flag.
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r--src/testdir/runtest.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index d8a1cf730a..b7f9229698 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -379,9 +379,6 @@ let s:flaky_tests = [
\ 'Test_zz1_terminal_in_gui()',
\ ]
-" Pattern indicating a common flaky test failure.
-let s:flaky_errors_re = 'StopVimInTerminal\|VerifyScreenDump'
-
" Locate Test_ functions and execute them.
redir @q
silent function /^Test_
@@ -410,6 +407,9 @@ for s:test in sort(s:tests)
let total_errors = []
let run_nr = 1
+ " A test can set test_is_flaky to retry running the test.
+ let test_is_flaky = 0
+
call RunTheTest(s:test)
" Repeat a flaky test. Give up when:
@@ -417,7 +417,7 @@ for s:test in sort(s:tests)
" - it fails five times (with a different message)
if len(v:errors) > 0
\ && (index(s:flaky_tests, s:test) >= 0
- \ || v:errors[0] =~ s:flaky_errors_re)
+ \ || test_is_flaky)
while 1
call add(s:messages, 'Found errors in ' . s:test . ':')
call extend(s:messages, v:errors)