]> granicus.if.org Git - vim/commitdiff
patch 8.2.0071: memory test often fails on Cirrus CI v8.2.0071
authorBram Moolenaar <Bram@vim.org>
Wed, 1 Jan 2020 14:17:25 +0000 (15:17 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 1 Jan 2020 14:17:25 +0000 (15:17 +0100)
Problem:    Memory test often fails on Cirrus CI.
Solution:   Allow for more tolerance in the upper limit.  Remove sleep.

src/testdir/test_memory_usage.vim
src/version.c

index 1e0dd6d03706d1510c996ca310539a5bafd5b8f5..43f4abcb51fd14ff4e3a804c38c4fee65f4d3078 100644 (file)
@@ -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()
index 58211bccefbad4f2bd902f1a7c9b528a0ec509f8..78af80d95daebdd516d845f298c10d4d6e4798c0 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    71,
 /**/
     70,
 /**/