From d60e0a1d202d49503ba95a40c165172c8f61db7a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 11 Apr 2018 10:06:04 +0200 Subject: [PATCH 1/4] patch 8.0.1696: coverage statistics don't work Problem: Coverate statistics don't work. Solution: Include the xxd directory. (Christian Brabandt) --- .travis.yml | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 98f0838f59..8b828eaaa4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ script: - if [ -n "$err" ]; then exit 1; fi after_success: - - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi + - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -i $SRCDIR/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi - if [ "$COVERAGE" = "yes" ]; then cd $SRCDIR && bash <(curl -s https://codecov.io/bash) ; fi # vim:set sts=2 sw=2 tw=0 et: diff --git a/src/version.c b/src/version.c index 2b41fae0c9..51e8259f25 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1696, /**/ 1695, /**/ From 769e9d21ac3e8dff43b9ef5e46cdc4523833b51e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 11 Apr 2018 20:53:49 +0200 Subject: [PATCH 2/4] patch 8.0.1697: various tests are still a bit flaky Problem: Various tests are still a bit flaky. Solution: Increase the default wait time to five seconds. --- src/testdir/screendump.vim | 6 +++--- src/testdir/shared.vim | 4 ++-- src/testdir/test_channel.vim | 4 ++-- src/testdir/test_clientserver.vim | 2 +- src/testdir/test_quotestar.vim | 8 ++++---- src/testdir/test_terminal.vim | 2 +- src/version.c | 2 ++ 7 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/testdir/screendump.vim b/src/testdir/screendump.vim index e1e660b373..9812e7e6de 100644 --- a/src/testdir/screendump.vim +++ b/src/testdir/screendump.vim @@ -60,8 +60,8 @@ func RunVimInTerminal(arguments, options) call assert_equal([rows, cols], term_getsize(buf)) " Wait for "All" of the ruler in the status line to be shown. - " This can be quite slow (e.g. when using valgrind), wait up to 4 seconds. - call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1}, 4000) + " This can be quite slow (e.g. when using valgrind). + call WaitFor({-> len(term_getline(buf, rows)) >= cols - 1}) return buf endfunc @@ -70,7 +70,7 @@ endfunc func StopVimInTerminal(buf) call assert_equal("running", term_getstatus(a:buf)) call term_sendkeys(a:buf, "\\:qa!\") - call WaitFor('term_getstatus(' . a:buf . ') == "finished"', 3000) + call WaitFor('term_getstatus(' . a:buf . ') == "finished"') only! endfunc diff --git a/src/testdir/shared.vim b/src/testdir/shared.vim index d47a355383..6c3f8a4e63 100644 --- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -113,14 +113,14 @@ func s:kill_server(cmd) endif endfunc -" Wait for up to a second for "expr" to become true. "expr" can be a +" Wait for up to five seconds for "expr" to become true. "expr" can be a " stringified expression to evaluate, or a funcref without arguments. " A second argument can be used to specify a different timeout in msec. " " Return time slept in milliseconds. With the +reltime feature this can be " more than the actual waiting time. Without +reltime it can also be less. func WaitFor(expr, ...) - let timeout = get(a:000, 0, 1000) + let timeout = get(a:000, 0, 5000) " using reltime() is more accurate, but not always available if has('reltime') let start = reltime() diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 235312e1de..ce573f9431 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1143,7 +1143,7 @@ func Test_pipe_to_buffer_raw() let job = job_start([s:python, '-c', \ 'import sys; [sys.stdout.write(".") and sys.stdout.flush() for _ in range(10000)]'], options) call assert_equal("run", job_status(job)) - call WaitFor('len(join(getline(1, "$"), "")) >= 10000', 3000) + call WaitFor('len(join(getline(1, "$"), "")) >= 10000') try let totlen = 0 for line in getline(1, '$') @@ -1506,7 +1506,7 @@ func Test_exit_callback_interval() let g:exit_cb_val = {'start': reltime(), 'end': 0, 'process': 0} let job = job_start([s:python, '-c', 'import time;time.sleep(0.5)'], {'exit_cb': 'MyExitTimeCb'}) let g:exit_cb_val.process = job_info(job).process - call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0', 2000) + call WaitFor('type(g:exit_cb_val.end) != v:t_number || g:exit_cb_val.end != 0') let elapsed = reltimefloat(g:exit_cb_val.end) call assert_true(elapsed > 0.5) call assert_true(elapsed < 1.0) diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim index 6ef64285e5..b807ecc9e3 100644 --- a/src/testdir/test_clientserver.vim +++ b/src/testdir/test_clientserver.vim @@ -32,7 +32,7 @@ func Test_client_server() " Takes a short while for the server to be active. " When using valgrind it takes much longer. - call WaitFor('serverlist() =~ "' . name . '"', 5000) + call WaitFor('serverlist() =~ "' . name . '"') call assert_match(name, serverlist()) call remote_foreground(name) diff --git a/src/testdir/test_quotestar.vim b/src/testdir/test_quotestar.vim index 3a8fdef3a3..b83fbe40e8 100644 --- a/src/testdir/test_quotestar.vim +++ b/src/testdir/test_quotestar.vim @@ -74,20 +74,20 @@ func Do_test_quotestar_for_x11() " by the server. let @* = 'no' call remote_foreground(name) - call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "no"', 3000) + call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "no"') " Set the * register on the server. call remote_send(name, ":let @* = 'yes'\") - call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"', 3000) + call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"') " Check that the *-register of this vim instance is changed as expected. - call WaitFor('@* == "yes"', 3000) + call WaitFor('@* == "yes"') " Handle the large selection over 262040 byte. let length = 262044 let sample = 'a' . repeat('b', length - 2) . 'c' let @* = sample - call WaitFor('remote_expr("' . name . '", "len(@*) >= ' . length . '", "", 1)', 3000) + call WaitFor('remote_expr("' . name . '", "len(@*) >= ' . length . '", "", 1)') let res = remote_expr(name, "@*", "", 2) call assert_equal(length, len(res)) " Check length to prevent a large amount of output at assertion failure. diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 3b95d39dd0..e97ee06910 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -1061,7 +1061,7 @@ func Api_drop_common(options) \ "set t_ts=", \ ], 'Xscript') let buf = RunVimInTerminal('-S Xscript', {}) - call WaitFor({-> bufnr('Xtextfile') > 0}, 5000) + call WaitFor({-> bufnr('Xtextfile') > 0}) call assert_equal('Xtextfile', expand('%:t')) call assert_true(winnr('$') >= 3) return buf diff --git a/src/version.c b/src/version.c index 51e8259f25..bc0e5130b6 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1697, /**/ 1696, /**/ From 1ed00330bcd169d5fcd72608e2745612b5b1d5b5 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 11 Apr 2018 21:03:08 +0200 Subject: [PATCH 3/4] patch 8.0.1698: coverage statistics don't work on coveralls Problem: Coverate statistics don't work on coveralls. Solution: Use curly braces for $SRCDIR. --- .travis.yml | 4 ++-- src/version.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8b828eaaa4..264052d570 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,7 +108,7 @@ script: - if [ -n "$err" ]; then exit 1; fi after_success: - - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b $SRCDIR -x .xs -i $SRCDIR/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi - - if [ "$COVERAGE" = "yes" ]; then cd $SRCDIR && bash <(curl -s https://codecov.io/bash) ; fi + - if [ "$COVERAGE" = "yes" ]; then ~/.local/bin/coveralls -b ${SRCDIR} -x .xs -i ${SRCDIR}/xxd -e ${SRCDIR}/if_perl.c --encodings utf-8 latin-1 EUC-KR; fi + - if [ "$COVERAGE" = "yes" ]; then cd ${SRCDIR} && bash <(curl -s https://codecov.io/bash) ; fi # vim:set sts=2 sw=2 tw=0 et: diff --git a/src/version.c b/src/version.c index bc0e5130b6..5a26ec58d9 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1698, /**/ 1697, /**/ From 9ce4213b0322477ace1df5e0aa356b1a5551b445 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 11 Apr 2018 22:19:36 +0200 Subject: [PATCH 4/4] patch 8.0.1699: leftover stuff for Python 1.4 Problem: Leftover stuff for Python 1.4. Solution: Remove outdated Python 1.4 stuff. (Naoki Inada, closes #2794) --- src/Makefile | 6 ------ src/auto/configure | 18 ++---------------- src/config.aap.in | 2 -- src/config.mk.in | 3 --- src/configure.ac | 15 ++------------- src/version.c | 2 ++ 6 files changed, 6 insertions(+), 40 deletions(-) diff --git a/src/Makefile b/src/Makefile index 071282d25e..85de383317 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3170,12 +3170,6 @@ objects/if_perl.o: auto/if_perl.c objects/if_perlsfio.o: if_perlsfio.c $(CCC_NF) $(PERL_CFLAGS) $(ALL_CFLAGS) -o $@ if_perlsfio.c -objects/py_getpath.o: $(PYTHON_CONFDIR)/getpath.c - $(CCC_NF) $(PYTHON_CFLAGS) $(ALL_CFLAGS) -o $@ \ - $(PYTHON_CONFDIR)/getpath.c \ - -I$(PYTHON_CONFDIR) -DHAVE_CONFIG_H -DNO_MAIN \ - $(PYTHON_GETPATH_CFLAGS) - objects/if_python.o: if_python.c if_py_both.h $(CCC_NF) $(PYTHON_CFLAGS) $(PYTHON_CFLAGS_EXTRA) $(ALL_CFLAGS) -o $@ if_python.c diff --git a/src/auto/configure b/src/auto/configure index 56d5a9dd4b..7fe5975751 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -679,14 +679,11 @@ PYTHON3_OBJ PYTHON3_SRC PYTHON3_CFLAGS PYTHON3_LIBS -PYTHON3_CONFDIR vi_cv_path_python3 PYTHON_OBJ PYTHON_SRC PYTHON_CFLAGS -PYTHON_GETPATH_CFLAGS PYTHON_LIBS -PYTHON_CONFDIR vi_cv_path_python PERL_LIBS PERL_CFLAGS @@ -6018,11 +6015,7 @@ eof vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python" fi else - if test "${vi_cv_var_python_version}" = "1.4"; then - vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a" - else - vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" - fi + vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'` python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'` @@ -6068,10 +6061,6 @@ $as_echo "$vi_cv_dll_name_python" >&6; } fi PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" - if test "${vi_cv_var_python_version}" = "1.4"; then - PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" - fi - PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5 $as_echo_n "checking if -pthread should be used... " >&6; } @@ -6175,8 +6164,6 @@ fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5 $as_echo_n "checking --enable-python3interp argument... " >&6; } # Check whether --enable-python3interp was given. @@ -6504,7 +6491,6 @@ fi - if test "$python_ok" = yes && test "$python3_ok" = yes; then $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h @@ -14323,7 +14309,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5 $as_echo_n "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; } -if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_GETPATH_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then +if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h diff --git a/src/config.aap.in b/src/config.aap.in index eebd036980..34ddfa618e 100644 --- a/src/config.aap.in +++ b/src/config.aap.in @@ -47,8 +47,6 @@ PYTHON_SRC = @PYTHON_SRC@ PYTHON_OBJ = @PYTHON_OBJ@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ -PYTHON_CONFDIR = @PYTHON_CONFDIR@ -PYTHON_GETPATH_CFLAGS = @PYTHON_GETPATH_CFLAGS@ TCL = @vi_cv_path_tcl@ TCL_SRC = @TCL_SRC@ diff --git a/src/config.mk.in b/src/config.mk.in index 1e7fbd5106..84c1590928 100644 --- a/src/config.mk.in +++ b/src/config.mk.in @@ -65,14 +65,11 @@ PYTHON_SRC = @PYTHON_SRC@ PYTHON_OBJ = @PYTHON_OBJ@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_LIBS = @PYTHON_LIBS@ -PYTHON_CONFDIR = @PYTHON_CONFDIR@ -PYTHON_GETPATH_CFLAGS = @PYTHON_GETPATH_CFLAGS@ PYTHON3_SRC = @PYTHON3_SRC@ PYTHON3_OBJ = @PYTHON3_OBJ@ PYTHON3_CFLAGS = @PYTHON3_CFLAGS@ PYTHON3_LIBS = @PYTHON3_LIBS@ -PYTHON3_CONFDIR = @PYTHON3_CONFDIR@ TCL = @vi_cv_path_tcl@ TCL_SRC = @TCL_SRC@ diff --git a/src/configure.ac b/src/configure.ac index 4e71de3312..f2655a575d 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -1211,11 +1211,7 @@ eof vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python" fi else - if test "${vi_cv_var_python_version}" = "1.4"; then - vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a" - else - vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" - fi + vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}" dnl -- Check if the path contained in python_LINKFORSHARED is dnl usable for vim build. If not, make and try other dnl candidates. @@ -1262,10 +1258,6 @@ eof fi PYTHON_SRC="if_python.c" PYTHON_OBJ="objects/if_python.o" - if test "${vi_cv_var_python_version}" = "1.4"; then - PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o" - fi - PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'" dnl On FreeBSD linking with "-pthread" is required to use threads. dnl _THREAD_SAFE must be used for compiling then. @@ -1334,9 +1326,7 @@ eof fi fi -AC_SUBST(PYTHON_CONFDIR) AC_SUBST(PYTHON_LIBS) -AC_SUBST(PYTHON_GETPATH_CFLAGS) AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_SRC) AC_SUBST(PYTHON_OBJ) @@ -1542,7 +1532,6 @@ eof fi fi -AC_SUBST(PYTHON3_CONFDIR) AC_SUBST(PYTHON3_LIBS) AC_SUBST(PYTHON3_CFLAGS) AC_SUBST(PYTHON3_SRC) @@ -4382,7 +4371,7 @@ dnl (e.g. ino_t and off_t), all of Vim's modules must be compiled with a dnl consistent value. It's therefore safest to force the use of the define dnl if it's present in any of the *_CFLAGS variables. AC_MSG_CHECKING(whether we need to force -D_FILE_OFFSET_BITS=64) -if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_GETPATH_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then +if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then AC_MSG_RESULT(yes) AC_DEFINE(_FILE_OFFSET_BITS, 64) else diff --git a/src/version.c b/src/version.c index 5a26ec58d9..5f352cf48c 100644 --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1699, /**/ 1698, /**/