Mercurial > vim
changeset 19021:fa3e63666acb v8.2.0071
patch 8.2.0071: memory test often fails on Cirrus CI
Commit: https://github.com/vim/vim/commit/1832d12aea30f1533f3c461d9e1530d10f66b162
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 1 15:17:25 2020 +0100
patch 8.2.0071: memory test often fails on Cirrus CI
Problem: Memory test often fails on Cirrus CI.
Solution: Allow for more tolerance in the upper limit. Remove sleep.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Jan 2020 15:30:03 +0100 |
parents | ad42a3aebe99 |
children | ab4224193d29 |
files | src/testdir/test_memory_usage.vim src/version.c |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_memory_usage.vim +++ b/src/testdir/test_memory_usage.vim @@ -133,8 +133,6 @@ func Test_memory_func_capture_lvars() let vim = s:vim_new() call vim.start('--clean', '-c', 'set noswapfile', testfile) - " Wait a bit until the process has started and sourced the script. - sleep 200m let before = s:monitor_memory_usage(vim.pid).last call term_sendkeys(vim.buf, ":so %\<CR>") @@ -150,9 +148,15 @@ func Test_memory_func_capture_lvars() " The usage may be a bit less than the last value, use 80%. " Allow for 20% tolerance at the upper limit. That's very permissive, but - " otherwise the test fails sometimes. + " otherwise the test fails sometimes. On Cirrus CI with FreeBSD we need to + " be even more permissive. + if has('bsd') + let multiplier = 14 + else + let multiplier = 12 + endif let lower = before * 8 / 10 - let upper = (after.max + (after.last - before)) * 12 / 10 + let upper = (after.max + (after.last - before)) * multiplier / 10 call assert_inrange(lower, upper, last) call vim.stop()