Patch 9.0.0369
Problem: A failing flaky test doesn't mention the time.
Solution: Add the time for debugging. Improve error message.
Files: src/testdir/runtest.vim, src/testdir/shared.vim
*** ../vim-9.0.0368/src/testdir/runtest.vim 2022-08-02 11:48:48.295757318
+0100
--- src/testdir/runtest.vim 2022-09-03 13:44:06.764213779 +0100
***************
*** 465,470 ****
--- 465,471 ----
" A test can set g:test_is_flaky to retry running the test.
let g:test_is_flaky = 0
+ let starttime = strftime("%T")
call RunTheTest(g:testfunc)
" Repeat a flaky test. Give up when:
***************
*** 475,484 ****
\ && $TEST_NO_RETRY == ''
\ && g:test_is_flaky
while 1
! call add(s:messages, 'Found errors in ' . g:testfunc . ':')
call extend(s:messages, v:errors)
! call add(total_errors, 'Run ' . g:run_nr . ':')
call extend(total_errors, v:errors)
if g:run_nr >= 5 || prev_error == v:errors[0]
--- 476,485 ----
\ && $TEST_NO_RETRY == ''
\ && g:test_is_flaky
while 1
! call add(s:messages, 'Found errors in ' .. g:testfunc .. ':')
call extend(s:messages, v:errors)
! call add(total_errors, starttime .. ' Run ' .. g:run_nr .. ':')
call extend(total_errors, v:errors)
if g:run_nr >= 5 || prev_error == v:errors[0]
***************
*** 498,503 ****
--- 499,505 ----
let v:errors = []
let g:run_nr += 1
+ let starttime = strftime("%T")
call RunTheTest(g:testfunc)
if len(v:errors) == 0
*** ../vim-9.0.0368/src/testdir/shared.vim 2022-09-01 18:42:29.680258960
+0100
--- src/testdir/shared.vim 2022-09-03 13:51:46.959048255 +0100
***************
*** 98,113 ****
try
let g:currentJob = RunCommand(pycmd)
! " Wait for up to 2 seconds for the port number to be there.
let port = GetPort()
if port == 0
! call assert_false(1, "Can't start " . a:cmd)
return
endif
call call(function(a:testfunc), [port])
catch
! call assert_false(1, 'Caught exception: "' . v:exception . '" in ' .
v:throwpoint)
finally
call s:kill_server(a:cmd)
endtry
--- 98,113 ----
try
let g:currentJob = RunCommand(pycmd)
! " Wait for some time for the port number to be there.
let port = GetPort()
if port == 0
! call assert_report(strftime("%T") .. " Can't start " .. a:cmd)
return
endif
call call(function(a:testfunc), [port])
catch
! call assert_report('Caught exception: "' . v:exception . '" in ' .
v:throwpoint)
finally
call s:kill_server(a:cmd)
endtry
*** ../vim-9.0.0368/src/version.c 2022-09-03 12:59:15.326103296 +0100
--- src/version.c 2022-09-03 13:45:13.996039756 +0100
***************
*** 709,710 ****
--- 709,712 ----
{ /* Add new patch number below this line */
+ /**/
+ 369,
/**/
--
Engineers will go without food and hygiene for days to solve a problem.
(Other times just because they forgot.)
(Scott Adams - The Dilbert principle)
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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/20220903125936.60C9F1C0CE4%40moolenaar.net.