diff src/testdir/shared.vim @ 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 619730d0d864
children 2b15ee496cbd
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