Patch 8.2.0400
Problem: Not all tests using a terminal are in the list of flaky tests.
Solution: Introduce the test_is_flaky flag.
Files: src/testdir/runtest.vim, src/testdir/term_util.vim,
src/testdir/screendump.vim, src/testdir/test_autocmd.vim
*** ../vim-8.2.0399/src/testdir/runtest.vim 2020-03-01 23:32:22.348059441
+0100
--- src/testdir/runtest.vim 2020-03-18 18:54:44.847003849 +0100
***************
*** 379,387 ****
\ '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_
--- 379,384 ----
***************
*** 410,415 ****
--- 407,415 ----
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,423 ****
" - 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)
while 1
call add(s:messages, 'Found errors in ' . s:test . ':')
call extend(s:messages, v:errors)
--- 417,423 ----
" - it fails five times (with a different message)
if len(v:errors) > 0
\ && (index(s:flaky_tests, s:test) >= 0
! \ || test_is_flaky)
while 1
call add(s:messages, 'Found errors in ' . s:test . ':')
call extend(s:messages, v:errors)
*** ../vim-8.2.0399/src/testdir/term_util.vim 2019-09-26 23:02:16.000000000
+0200
--- src/testdir/term_util.vim 2020-03-18 18:54:13.867136000 +0100
***************
*** 93,103 ****
--- 93,109 ----
call assert_report('RunVimInTerminal() failed, screen contents: ' .
join(lines, "<NL>"))
endtry
+ " Starting a terminal to run Vim is always considered flaky.
+ let test_is_flaky = 1
+
return buf
endfunc
" Stop a Vim running in terminal buffer "buf".
func StopVimInTerminal(buf)
+ " Using a terminal to run Vim is always considered flaky.
+ let test_is_flaky = 1
+
call assert_equal("running", term_getstatus(a:buf))
" CTRL-O : works both in Normal mode and Insert mode to start a command
line.
*** ../vim-8.2.0399/src/testdir/screendump.vim 2019-09-01 14:36:29.000000000
+0200
--- src/testdir/screendump.vim 2020-03-18 18:49:41.332348284 +0100
***************
*** 24,29 ****
--- 24,32 ----
let reference = 'dumps/' . a:filename . '.dump'
let testfile = 'failed/' . a:filename . '.dump'
+ " Starting a terminal to make a screendump is always considered flaky.
+ let test_is_flaky = 1
+
" Redraw to execute the code that updates the screen. Otherwise we get the
" text and attributes only from the internal buffer.
redraw
*** ../vim-8.2.0399/src/testdir/test_autocmd.vim 2020-03-15
14:19:19.394376259 +0100
--- src/testdir/test_autocmd.vim 2020-03-18 18:47:58.324836875 +0100
***************
*** 1868,1873 ****
--- 1868,1875 ----
func Test_Changed_FirstTime()
CheckFeature terminal
CheckNotGui
+ " Starting a terminal to run Vim is always considered flaky.
+ let test_is_flaky = 1
" Prepare file for TextChanged event.
call writefile([''], 'Xchanged.txt')
*** ../vim-8.2.0399/src/version.c 2020-03-18 15:23:10.983695087 +0100
--- src/version.c 2020-03-18 18:51:16.339914094 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 400,
/**/
--
Facepalm statement #5: "Petrol getting more expensive? Not for me, I'm always
tanking for 20 dollars"
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202003181818.02IIItE9000498%40masaka.moolenaar.net.