[neovim] 02/06: oldtests: Run nvim using --headless to avoid requesting user input

James McCoy jamessan at debian.org
Tue Aug 1 11:30:09 UTC 2017


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch debian/sid
in repository neovim.

commit c15359f66eea3b050ecc7c0f9cbb806bd55b32b8
Author: James McCoy <jamessan at jamessan.com>
Date:   Sun Jul 30 20:52:00 2017 -0400

    oldtests: Run nvim using --headless to avoid requesting user input
    
    Certain functions (e.g. feedkeys(…, 'x!') and input()) will attempt to
    read from stdin, which shouldn't be expected to work during oldtests.
    In Debian/Ubuntu's build environment, it explicitly can't work because
    /dev/null is redirected to stdin, which causes read_error_exit() to
    exit.
    
    Running oldtests with --headless prevents nvim from setting up its input
    handling, thus avoiding the problem altogether.
    
    Reference #6794
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 src/nvim/testdir/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile
index 70a9f2b..7b98aa8 100644
--- a/src/nvim/testdir/Makefile
+++ b/src/nvim/testdir/Makefile
@@ -128,7 +128,7 @@ $(SCRIPTS) $(SCRIPTS_GUI): $(NVIM_PRG) test1.out
 
 RM_ON_RUN   := test.out X* viminfo
 RM_ON_START := test.ok
-RUN_VIM     := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --noplugin -s dotest.in
+RUN_VIM     := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(NVIM_PRG) -u unix.vim -U NONE -i viminfo --headless --noplugin -s dotest.in
 
 clean:
 	-rm -rf *.out          \
@@ -197,7 +197,7 @@ nolog:
 # New style of tests uses Vim script with assert calls.  These are easier
 # to write and a lot easier to read and debug.
 # Limitation: Only works with the +eval feature.
-RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(NVIM_PRG) -u unix.vim -U NONE --noplugin
+RUN_VIMTEST = VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(VALGRIND) $(NVIM_PRG) -u unix.vim -U NONE --headless --noplugin
 
 newtests: newtestssilent
 	@/bin/sh -c "if test -f messages && grep -q 'FAILED' messages; then \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vim/neovim.git



More information about the pkg-vim-maintainers mailing list