Patch 9.0.1675

13 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 7, 2023, 7:26:51 PM7/7/23
to vim...@googlegroups.com

Patch 9.0.1675
Problem: Test may run into timeout when using valgrind.
Solution: Use a longer timeout when using valgrind.
Files: src/testdir/runtest.vim


*** ../vim-9.0.1674/src/testdir/runtest.vim 2023-06-04 16:55:23.342362151 +0100
--- src/testdir/runtest.vim 2023-07-08 00:22:31.350556318 +0100
***************
*** 92,97 ****
--- 92,100 ----
" Common with all tests on all systems.
source setup.vim

+ " Needed for RunningWithValgrind().
+ source shared.vim
+
" For consistency run all tests with 'nocompatible' set.
" This also enables use of line continuation.
set nocp viminfo+=nviminfo
***************
*** 219,230 ****
func TestTimeout(id)
split test.log
call append(line('$'), '')
! call append(line('$'), 'Test timed out: ' .. g:testfunc)
write
! call add(v:errors, 'Test timed out: ' . g:testfunc)

cquit! 42
endfunc

func RunTheTest(test)
let prefix = ''
--- 222,239 ----
func TestTimeout(id)
split test.log
call append(line('$'), '')
!
! let text = 'Test timed out: ' .. g:testfunc
! if g:timeout_start > 0
! let text ..= strftime(' after %s seconds', localtime() - g:timeout_start)
! endif
! call append(line('$'), text)
write
! call add(v:errors, text)

cquit! 42
endfunc
+ let g:timeout_start = 0

func RunTheTest(test)
let prefix = ''
***************
*** 237,243 ****
if has('timers')
" No test should take longer than 30 seconds. If it takes longer we
" assume we are stuck and need to break out.
! let test_timeout_timer = timer_start(30000, 'TestTimeout')
endif

" Avoid stopping at the "hit enter" prompt
--- 246,254 ----
if has('timers')
" No test should take longer than 30 seconds. If it takes longer we
" assume we are stuck and need to break out.
! let test_timeout_timer =
! \ timer_start(RunningWithValgrind() ? 50000 : 30000, 'TestTimeout')
! let g:timeout_start = localtime()
endif

" Avoid stopping at the "hit enter" prompt
***************
*** 307,312 ****
--- 318,324 ----

if has('timers')
call timer_stop(test_timeout_timer)
+ let g:timeout_start = 0
endif

" Clear any autocommands and put back the catch-all for SwapExists.
***************
*** 371,377 ****

" close any split windows
while winnr('$') > 1
! bwipe!
endwhile

" May be editing some buffer, wipe it out. Then we may end up in another
--- 383,389 ----

" close any split windows
while winnr('$') > 1
! noswapfile bwipe!
endwhile

" May be editing some buffer, wipe it out. Then we may end up in another
*** ../vim-9.0.1674/src/version.c 2023-07-07 23:19:04.463417819 +0100
--- src/version.c 2023-07-08 00:24:35.522478594 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1675,
/**/

--
We're knights of the Round Table
Our shows are formidable
But many times
We're given rhymes
That are quite unsingable
We're opera mad in Camelot
We sing from the diaphragm a lot.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages