changeset 14919:7ad55ed0a4f3 v8.1.0471

patch 8.1.0471: some tests are flaky or fail on some systems commit https://github.com/vim/vim/commit/453ce7c16b1001f23f2281b259176c6a00d82999 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 12 22:15:12 2018 +0200 patch 8.1.0471: some tests are flaky or fail on some systems Problem: Some tests are flaky or fail on some systems. Solution: Increase waiting time for port number. Use "cmd /c" to execute "echo" on win32. (Ken Takata, closes #3534)
author Bram Moolenaar <Bram@vim.org>
date Fri, 12 Oct 2018 22:30:05 +0200
parents 7a53b98d24db
children 1a2b8e0e9eb2
files src/testdir/shared.vim src/testdir/test_channel.vim src/version.c
diffstat 3 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/shared.vim
+++ b/src/testdir/shared.vim
@@ -49,7 +49,8 @@ endfunc
 " Read the port number from the Xportnr file.
 func GetPort()
   let l = []
-  for i in range(200)
+  " with 200 it sometimes failed
+  for i in range(400)
     try
       let l = readfile("Xportnr")
     catch
@@ -274,6 +275,10 @@ func GetVimCommandClean()
   let cmd = GetVimCommand()
   let cmd = substitute(cmd, '-u NONE', '--clean', '')
   let cmd = substitute(cmd, '--not-a-term', '', '')
+
+  " Optionally run Vim under valgrind
+  " let cmd = 'valgrind --tool=memcheck --leak-check=yes --num-callers=25 --log-file=valgrind ' . cmd
+
   return cmd
 endfunc
 
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -1340,7 +1340,7 @@ func Test_close_and_exit_cb()
     let self.ret['exit_cb'] = job_status(a:job)
   endfunc
 
-  let g:job = job_start('echo', {
+  let g:job = job_start(has('win32') ? 'cmd /c echo:' : 'echo', {
         \ 'close_cb': g:retdict.close_cb,
         \ 'exit_cb': g:retdict.exit_cb,
         \ })
@@ -1369,7 +1369,8 @@ func Test_exit_cb_wipes_buf()
   new
   let g:wipe_buf = bufnr('')
 
-  let job = job_start(['true'], {'exit_cb': 'ExitCbWipe'})
+  let job = job_start(has('win32') ? 'cmd /c echo:' : ['true'],
+			  \ {'exit_cb': 'ExitCbWipe'})
   let timer = timer_start(300, {-> feedkeys("\<Esc>", 'nt')}, {'repeat': 5})
   call feedkeys(repeat('g', 1000) . 'o', 'ntx!')
   call WaitForAssert({-> assert_equal("dead", job_status(job))})
--- a/src/version.c
+++ b/src/version.c
@@ -793,6 +793,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    471,
+/**/
     470,
 /**/
     469,