diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-06-19 20:13:56 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-19 20:13:56 +0100 |
commit | e366ed4f2c6fa8cb663f1b9599b39d57ddbd8a2a (patch) | |
tree | e79d26066d2e9011af77ad5376908f45d6214b04 | |
parent | 0f0d3a7fb6473760b6f6679e3c8a81376220c869 (diff) |
patch 8.2.5136: debugger test fails when run with valgrindv8.2.5136
Problem: Debugger test fails when run with valgrind.
Solution: Wait longer when using valgrind.
-rw-r--r-- | src/testdir/shared.vim | 6 | ||||
-rw-r--r-- | src/testdir/test_debugger.vim | 4 | ||||
-rw-r--r-- | src/testdir/test_search.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 11 insertions, 3 deletions
diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index 60636fd314..bb42678acc 100644 --- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -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() diff --git a/src/testdir/test_debugger.vim b/src/testdir/test_debugger.vim index 17d3616a0e..b748a004da 100644 --- a/src/testdir/test_debugger.vim +++ b/src/testdir/test_debugger.vim @@ -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'}) diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim index 1dce1604a2..67d29c5d46 100644 --- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -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 diff --git a/src/version.c b/src/version.c index c945a2bbcc..467854439d 100644 --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 5136, +/**/ 5135, /**/ 5134, |