diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 15:30:20 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-08-21 15:35:08 +0800 |
commit | 00f92f086e9e4b47e7067b8247881491468eb893 (patch) | |
tree | 6aa7f3436f982d49af2259a8aacbb3699fa645a2 | |
parent | 7aa3f825cd4298276186493fc45ff739049a95a2 (diff) | |
download | rneovim-00f92f086e9e4b47e7067b8247881491468eb893.tar.gz rneovim-00f92f086e9e4b47e7067b8247881491468eb893.tar.bz2 rneovim-00f92f086e9e4b47e7067b8247881491468eb893.zip |
vim-patch:8.2.3518: Test_xrestore sometimes fails
Problem: Test_xrestore sometimes fails.
Solution: Mark the test as flayky. Move marking test as flaky to the test
instead of listing them in runtest.
https://github.com/vim/vim/commit/f08b0eb8691ff09f98bc4beef986ece1c521655f
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/old/testdir/runtest.vim | 30 | ||||
-rw-r--r-- | test/old/testdir/test_autocmd.vim | 3 | ||||
-rw-r--r-- | test/old/testdir/test_clientserver.vim | 3 | ||||
-rw-r--r-- | test/old/testdir/test_diffmode.vim | 1 | ||||
-rw-r--r-- | test/old/testdir/test_functions.vim | 1 | ||||
-rw-r--r-- | test/old/testdir/test_mapping.vim | 8 | ||||
-rw-r--r-- | test/old/testdir/test_popup.vim | 2 | ||||
-rw-r--r-- | test/old/testdir/test_quotestar.vim | 1 | ||||
-rw-r--r-- | test/old/testdir/test_reltime.vim | 1 | ||||
-rw-r--r-- | test/old/testdir/test_timers.vim | 7 |
10 files changed, 23 insertions, 34 deletions
diff --git a/test/old/testdir/runtest.vim b/test/old/testdir/runtest.vim index 08dde1fe4f..6be6fd0fd3 100644 --- a/test/old/testdir/runtest.vim +++ b/test/old/testdir/runtest.vim @@ -489,33 +489,6 @@ else endtry endif -" Names of flaky tests. -let s:flaky_tests = [ - \ 'Test_autocmd_SafeState()', - \ 'Test_cursorhold_insert()', - \ 'Test_exit_callback_interval()', - \ 'Test_map_timeout_with_timer_interrupt()', - \ 'Test_out_cb()', - \ 'Test_popup_and_window_resize()', - \ 'Test_quoteplus()', - \ 'Test_quotestar()', - \ 'Test_reltime()', - \ 'Test_state()', - \ 'Test_term_mouse_double_click_to_create_tab()', - \ 'Test_term_mouse_multiple_clicks_to_visually_select()', - \ 'Test_terminal_composing_unicode()', - \ 'Test_terminal_redir_file()', - \ 'Test_terminal_tmap()', - \ 'Test_timer_oneshot()', - \ 'Test_timer_paused()', - \ 'Test_timer_repeat_many()', - \ 'Test_timer_repeat_three()', - \ 'Test_timer_stop_all_in_callback()', - \ 'Test_timer_stop_in_callback()', - \ 'Test_timer_with_partial_callback()', - \ 'Test_termwinscroll()', - \ ] - " Delete the .res file, it may change behavior for completion call delete(fnamemodify(g:testname, ':r') .. '.res') @@ -565,8 +538,7 @@ for g:testfunc in sort(s:tests) " - it fails five times (with a different message) if len(v:errors) > 0 \ && $TEST_NO_RETRY == '' - \ && (index(s:flaky_tests, g:testfunc) >= 0 - \ || g:test_is_flaky) + \ && g:test_is_flaky while 1 call add(s:messages, 'Found errors in ' .. g:testfunc .. ':') call extend(s:messages, v:errors) diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim index 9bb36c4149..59149abaf7 100644 --- a/test/old/testdir/test_autocmd.vim +++ b/test/old/testdir/test_autocmd.vim @@ -2013,6 +2013,7 @@ endfunc " Test for BufUnload autocommand that unloads all the other buffers func Test_bufunload_all() + let g:test_is_flaky = 1 call writefile(['Test file Xxx1'], 'Xxx1')" call writefile(['Test file Xxx2'], 'Xxx2')" @@ -2961,6 +2962,7 @@ endfunc func Test_autocmd_SafeState() CheckRunVimInTerminal + let g:test_is_flaky = 1 let lines =<< trim END let g:safe = 0 @@ -3044,6 +3046,7 @@ func Test_autocmd_was_using_freed_memory() endfunc func Test_BufWrite_lockmarks() + let g:test_is_flaky = 1 edit! Xtest call setline(1, ['a', 'b', 'c', 'd']) diff --git a/test/old/testdir/test_clientserver.vim b/test/old/testdir/test_clientserver.vim index d8b29f6c42..be6c8151af 100644 --- a/test/old/testdir/test_clientserver.vim +++ b/test/old/testdir/test_clientserver.vim @@ -26,9 +26,10 @@ func Check_X11_Connection() endfunc func Test_client_server() + let g:test_is_flaky = 1 let cmd = GetVimCommand() if cmd == '' - return + throw 'GetVimCommand() failed' endif call Check_X11_Connection() diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim index ac90aaaa02..bc5c42e985 100644 --- a/test/old/testdir/test_diffmode.vim +++ b/test/old/testdir/test_diffmode.vim @@ -857,6 +857,7 @@ func VerifyInternal(buf, dumpfile, extra) endfunc func Test_diff_screen() + let g:test_is_flaky = 1 CheckScreendump CheckFeature menu diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim index 95c132a5c0..1d713e91ce 100644 --- a/test/old/testdir/test_functions.vim +++ b/test/old/testdir/test_functions.vim @@ -2567,6 +2567,7 @@ endfunc func Test_state() CheckRunVimInTerminal + let g:test_is_flaky = 1 let getstate = ":echo 'state: ' .. g:state .. '; mode: ' .. g:mode\<CR>" diff --git a/test/old/testdir/test_mapping.vim b/test/old/testdir/test_mapping.vim index 7618ed8547..40d0b3e6f7 100644 --- a/test/old/testdir/test_mapping.vim +++ b/test/old/testdir/test_mapping.vim @@ -278,9 +278,9 @@ func Test_map_timeout() endfunc func Test_map_timeout_with_timer_interrupt() - if !has('job') || !has('timers') - return - endif + CheckFeature job + CheckFeature timers + let g:test_is_flaky = 1 " Confirm the timer invoked in exit_cb of the job doesn't disturb mapped key " sequence. @@ -1226,7 +1226,7 @@ func Test_map_cmdkey_visual_mode() call feedkeys("v\<F4>", 'xt!') call assert_equal(['v', 1, 12], [mode(1), col('v'), col('.')]) - " can invoke an opeartor, ending the visual mode + " can invoke an operator, ending the visual mode let @a = '' call feedkeys("\<F5>", 'xt!') call assert_equal('n', mode(1)) diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim index fda84cbae8..82408b508b 100644 --- a/test/old/testdir/test_popup.vim +++ b/test/old/testdir/test_popup.vim @@ -676,7 +676,9 @@ endfunc func Test_popup_and_window_resize() CheckFeature terminal + CheckFeature quickfix CheckNotGui + let g:test_is_flaky = 1 let h = winheight(0) if h < 15 diff --git a/test/old/testdir/test_quotestar.vim b/test/old/testdir/test_quotestar.vim index 6a6719da8b..93b0d928ce 100644 --- a/test/old/testdir/test_quotestar.vim +++ b/test/old/testdir/test_quotestar.vim @@ -131,6 +131,7 @@ func Do_test_quotestar_for_x11() endfunc func Test_quotestar() + let g:test_is_flaky = 1 let skipped = '' let quotestar_saved = @* diff --git a/test/old/testdir/test_reltime.vim b/test/old/testdir/test_reltime.vim index f4ce5de118..8ed09dd10f 100644 --- a/test/old/testdir/test_reltime.vim +++ b/test/old/testdir/test_reltime.vim @@ -5,6 +5,7 @@ CheckFeature reltime CheckFeature float func Test_reltime() + let g:test_is_flaky = 1 let now = reltime() sleep 10m let later = reltime() diff --git a/test/old/testdir/test_timers.vim b/test/old/testdir/test_timers.vim index 21541d673d..42114618fb 100644 --- a/test/old/testdir/test_timers.vim +++ b/test/old/testdir/test_timers.vim @@ -21,6 +21,7 @@ func MyHandlerWithLists(lists, timer) endfunc func Test_timer_oneshot() + let g:test_is_flaky = 1 let g:val = 0 let timer = timer_start(50, 'MyHandler') let slept = WaitFor('g:val == 1') @@ -33,6 +34,7 @@ func Test_timer_oneshot() endfunc func Test_timer_repeat_three() + let g:test_is_flaky = 1 let g:val = 0 let timer = timer_start(50, 'MyHandler', {'repeat': 3}) let slept = WaitFor('g:val == 3') @@ -45,6 +47,7 @@ func Test_timer_repeat_three() endfunc func Test_timer_repeat_many() + let g:test_is_flaky = 1 let g:val = 0 let timer = timer_start(50, 'MyHandler', {'repeat': -1}) sleep 200m @@ -53,6 +56,7 @@ func Test_timer_repeat_many() endfunc func Test_timer_with_partial_callback() + let g:test_is_flaky = 1 let g:val = 0 let meow = {'one': 1} function meow.bite(...) @@ -114,6 +118,7 @@ func Test_timer_stopall() endfunc func Test_timer_paused() + let g:test_is_flaky = 1 let g:val = 0 let id = timer_start(50, 'MyHandler') @@ -168,6 +173,7 @@ func StopTimer2(timer) endfunc func Test_timer_stop_in_callback() + let g:test_is_flaky = 1 call assert_equal(0, len(timer_info())) let g:timer1 = timer_start(10, 'StopTimer1') let slept = 0 @@ -187,6 +193,7 @@ func StopTimerAll(timer) endfunc func Test_timer_stop_all_in_callback() + let g:test_is_flaky = 1 call assert_equal(0, len(timer_info())) call timer_start(10, 'StopTimerAll') call assert_equal(1, len(timer_info())) |