]> granicus.if.org Git - vim/commitdiff
patch 8.2.5136: debugger test fails when run with valgrind v8.2.5136
authorBram Moolenaar <Bram@vim.org>
Sun, 19 Jun 2022 19:13:56 +0000 (20:13 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 19 Jun 2022 19:13:56 +0000 (20:13 +0100)
Problem:    Debugger test fails when run with valgrind.
Solution:   Wait longer when using valgrind.

src/testdir/shared.vim
src/testdir/test_debugger.vim
src/testdir/test_search.vim
src/version.c

index 60636fd3147e729cb6d97deeba74fa019b30dbeb..bb42678acca7297544f4579d85ca524ed45aa75e 100644 (file)
@@ -288,6 +288,12 @@ func GetVimCommand(...)
   return cmd
 endfunc
 
+" Return one when it looks like the tests are run with valgrind, which means
+" that everything is much slower.
+func RunningWithValgrind()
+  return GetVimCommand() =~ '\<valgrind\>'
+endfunc
+
 " Get the command to run Vim, with --clean instead of "-u NONE".
 func GetVimCommandClean()
   let cmd = GetVimCommand()
index 17d3616a0e0f3de717e427eaf433539a0cf03d0f..b748a004daee6267e46d36f81628634d95fd7a07 100644 (file)
@@ -408,7 +408,7 @@ def Test_Debugger_breakadd_vim9_expr()
 
   # Start Vim in a terminal
   var buf = g:RunVimInTerminal('-S Xtest.vim', {wait_for_ruler: 0})
-  call g:TermWait(buf)
+  call g:TermWait(buf, g:RunningWithValgrind() ? 1000 : 50)
 
   # Despite the failure the functions are defined
   g:RunDbgCmd(buf, ':function g:EarlyFunc',
@@ -434,7 +434,7 @@ def Test_Debugger_break_at_return()
 
   # Start Vim in a terminal
   var buf = g:RunVimInTerminal('-S Xtest.vim', {wait_for_ruler: 0})
-  call g:TermWait(buf)
+  call g:TermWait(buf, g:RunningWithValgrind() ? 1000 : 50)
 
   g:RunDbgCmd(buf, ':call GetNum()',
      ['line 1: return 1  + 2  + 3'], {match: 'pattern'})
index 1dce1604a2004b10c4b297624bfff7359c2f7177..67d29c5d46b6b01b96b40dc7f810df190a043a36 100644 (file)
@@ -374,7 +374,7 @@ func Test_searchpair_timeout_with_skip()
     let ms = 1
     let min_time = 0.001
     let max_time = min_time * 10.0
-    if GetVimCommand() =~ 'valgrind.*--log-file='
+    if RunningWithValgrind()
       let max_time += 0.04  " this can be slow with valgrind
     endif
   endif
index c945a2bbccd29b6b76462adc03046fe6777016d5..467854439de0b7c59e6b8931244ed4a90128b023 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5136,
 /**/
     5135,
 /**/