summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-11-16 18:22:45 +0100
committerBram Moolenaar <Bram@vim.org>2018-11-16 18:22:45 +0100
commitdbc0d2163aa5e090d5a0c83aea448803ddbab664 (patch)
tree54782de3b47ac8c8dc2b7983f6c20f6836872845
parentc0f05d0bd1a3191598334fb11ad0394e1460877e (diff)
downloadvim-git-dbc0d2163aa5e090d5a0c83aea448803ddbab664.tar.gz
patch 8.1.0531: flaky tests often fail with a common error messagev8.1.0531
Problem: Flaky tests often fail with a common error message. Solution: Add a pattern to match an error message indicating a flaky test.
-rw-r--r--src/testdir/runtest.vim9
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index fe17abb4d..9ba5d137d 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -273,7 +273,7 @@ else
endif
" Names of flaky tests.
-let s:flaky = [
+let s:flaky_tests = [
\ 'Test_call()',
\ 'Test_channel_handler()',
\ 'Test_client_server()',
@@ -329,6 +329,9 @@ let s:flaky = [
\ 'Test_zz1_terminal_in_gui()',
\ ]
+" Pattern indicating a common flaky test failure.
+let s:flaky_errors_re = 'StopVimInTerminal'
+
" Locate Test_ functions and execute them.
redir @q
silent function /^Test_
@@ -353,7 +356,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)
diff --git a/src/version.c b/src/version.c
index 878891e3f..e18c02511 100644
--- a/src/version.c
+++ b/src/version.c
@@ -793,6 +793,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 531,
+/**/
530,
/**/
529,