diff options
-rw-r--r-- | src/nvim/testdir/runtest.vim | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 605e7c73eb..2f10019ad9 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -263,7 +263,7 @@ else endif " Names of flaky tests. -let s:flaky = [ +let s:flaky_tests = [ \ 'Test_cursorhold_insert()', \ 'Test_exit_callback_interval()', \ 'Test_oneshot()', @@ -281,6 +281,9 @@ let s:flaky = [ \ 'Test_lambda_with_timer()', \ ] +" Pattern indicating a common flaky test failure. +let s:flaky_errors_re = 'StopVimInTerminal' + " Locate Test_ functions and execute them. redir @q silent function /^Test_ @@ -305,7 +308,9 @@ for s:test in sort(s:tests) " Repeat a flaky test. Give up when: " - it fails again with the same message " - it fails five times (with a different mesage) - if len(v:errors) > 0 && index(s:flaky, s:test) >= 0 + if len(v:errors) > 0 + \ && (index(s:flaky_tests, s:test) >= 0 + \ || v:errors[0] =~ s:flaky_errors_re) while 1 call add(s:messages, 'Found errors in ' . s:test . ':') call extend(s:messages, v:errors) |