]> granicus.if.org Git - vim/commitdiff
patch 8.1.0531: flaky tests often fail with a common error message v8.1.0531
authorBram Moolenaar <Bram@vim.org>
Fri, 16 Nov 2018 17:22:45 +0000 (18:22 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 16 Nov 2018 17:22:45 +0000 (18:22 +0100)
Problem:    Flaky tests often fail with a common error message.
Solution:   Add a pattern to match an error message indicating a flaky test.

src/testdir/runtest.vim
src/version.c

index fe17abb4d66651de0943e0822c4ad07882a24da2..9ba5d137d3704dc5530b288a88020098f012a605 100644 (file)
@@ -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)
index 878891e3fef5fa81e9e9042c2e3b5299b6dd273b..e18c025116f60a257e05a466feb7ef9a7d8612ab 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    531,
 /**/
     530,
 /**/