aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml16
-rw-r--r--CMakeLists.txt4
-rw-r--r--Makefile22
-rw-r--r--appveyor.yml5
-rwxr-xr-xci/before_install.sh10
-rw-r--r--ci/build.bat14
-rw-r--r--ci/common/build.sh16
-rwxr-xr-xci/install.sh11
-rwxr-xr-xci/run_lint.sh8
-rw-r--r--test/functional/api/server_notifications_spec.lua16
-rw-r--r--test/functional/api/server_requests_spec.lua10
-rw-r--r--test/functional/autocmd/cmdline_spec.lua2
-rw-r--r--test/functional/core/channels_spec.lua2
-rw-r--r--test/functional/core/job_spec.lua46
-rw-r--r--test/functional/ex_cmds/dict_notifications_spec.lua2
-rw-r--r--test/functional/helpers.lua12
-rw-r--r--test/functional/ui/input_spec.lua4
-rw-r--r--third-party/cmake/BuildLuarocks.cmake2
18 files changed, 115 insertions, 87 deletions
diff --git a/.travis.yml b/.travis.yml
index 565d4098b1..451b89888d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,13 +4,8 @@ language: c
env:
global:
- # To force rebuilding of third-party dependencies, set this to 'true'.
- - BUILD_NVIM_DEPS=false
- # Travis has 1.5 virtual cores according to
- # http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
- - MAKE_CMD="make -j2"
- # Update PATH for pip.
- - PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH"
+ # Set "false" to force rebuild of third-party dependencies.
+ - CACHE_ENABLE=true
# Build directory for Neovim.
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
# Build directory for third-party dependencies.
@@ -41,9 +36,7 @@ env:
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
# Environment variables for Valgrind.
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
- # Cache marker for third-party dependencies cache.
- # If this file exists, we know that the cache contains compiled
- # dependencies and we can use it.
+ # If this file exists, the cache is valid (compile was successful).
- CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker"
# default target name for functional tests
- FUNCTIONALTEST=functionaltest
@@ -72,11 +65,9 @@ jobs:
- os: osx
compiler: clang
osx_image: xcode7.3 # macOS 10.11
- env: PATH="/usr/local/opt/python@2/bin:$PATH"
- os: osx
compiler: gcc
osx_image: xcode7.3 # macOS 10.11
- env: PATH="/usr/local/opt/python@2/bin:$PATH"
- os: linux
env: CI_TARGET=lint
- stage: Flaky builds
@@ -115,6 +106,7 @@ addons:
- libc6-dev-i386
- libtool
- locales
+ - ninja-build
- pkg-config
- unzip
- valgrind
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8147afb14f..4b021ad6e7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,11 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(PreventInTreeBuilds)
# Prefer our bundled versions of dependencies.
+if(DEFINED ENV{DEPS_BUILD_DIR})
+set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/usr" CACHE PATH "Path prefix for finding dependencies")
+else()
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
+endif()
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX})
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin)
diff --git a/Makefile b/Makefile
index 4a880d270a..72db67a0d9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+THIS_DIR = $(shell pwd)
filter-false = $(strip $(filter-out 0 off OFF false FALSE,$1))
filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
@@ -8,11 +9,14 @@ CMAKE_PRG ?= $(shell (command -v cmake3 || echo cmake))
CMAKE_BUILD_TYPE ?= Debug
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
-DOC_DOWNLOAD_URL_BASE := https://raw.githubusercontent.com/neovim/doc/gh-pages
-CLINT_ERRORS_FILE_PATH := /reports/clint/errors.json
BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \
echo "Unix Makefiles")
+DEPS_BUILD_DIR ?= .deps
+
+ifneq (1,$(words [$(DEPS_BUILD_DIR)]))
+ $(error DEPS_BUILD_DIR must not contain whitespace)
+endif
ifeq (,$(BUILD_TOOL))
ifeq (Ninja,$(BUILD_TYPE))
@@ -48,7 +52,7 @@ endif
ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS)))
BUNDLED_LUA_CMAKE_FLAG := -DUSE_BUNDLED_LUA=ON
- $(shell [ -x .deps/usr/bin/lua ] || rm build/.ran-*)
+ $(shell [ -x $(DEPS_BUILD_DIR)/usr/bin/lua ] || rm build/.ran-*)
endif
# For use where we want to make sure only a single job is run. This does issue
@@ -68,20 +72,20 @@ cmake:
$(MAKE) build/.ran-cmake
build/.ran-cmake: | deps
- cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) ..
+ cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) $(THIS_DIR)
touch $@
deps: | build/.ran-third-party-cmake
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
- +$(BUILD_CMD) -C .deps
+ +$(BUILD_CMD) -C $(DEPS_BUILD_DIR)
endif
build/.ran-third-party-cmake:
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
- mkdir -p .deps
- cd .deps && \
+ mkdir -p $(DEPS_BUILD_DIR)
+ cd $(DEPS_BUILD_DIR) && \
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
- $(DEPS_CMAKE_FLAGS) ../third-party
+ $(DEPS_CMAKE_FLAGS) $(THIS_DIR)/third-party
endif
mkdir -p build
touch $@
@@ -124,7 +128,7 @@ clean:
$(MAKE) -C runtime/doc clean
distclean: clean
- rm -rf .deps build
+ rm -rf $(DEPS_BUILD_DIR) build
install: | nvim
+$(BUILD_CMD) -C build install
diff --git a/appveyor.yml b/appveyor.yml
index 8c2c89560c..ab2bfc92fe 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,15 +3,14 @@ environment:
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
image: Visual Studio 2017
configuration:
-- MSVC_64
-- MSVC_32
- MINGW_64
- MINGW_32
+- MSVC_64
+# - MSVC_32
- MINGW_64-gcov
matrix:
allow_failures:
- configuration: MSVC_64
- - configuration: MSVC_32
- configuration: MINGW_64-gcov
install: []
before_build:
diff --git a/ci/before_install.sh b/ci/before_install.sh
index f696b85afc..9a3e192536 100755
--- a/ci/before_install.sh
+++ b/ci/before_install.sh
@@ -24,19 +24,13 @@ echo 'python info:'
) | sed 's/^/ /'
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
- echo "Install Python 2."
- brew install python@2
-fi
-
-echo "Upgrade Python 2 pip."
-pip2.7 -q install --user --upgrade pip
-
-if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
echo "Upgrade Python 3."
brew upgrade python
echo "Upgrade Python 3 pip."
pip3 -q install --user --upgrade pip
else
+ echo "Upgrade Python 2 pip."
+ pip2.7 -q install --user --upgrade pip
echo "Upgrade Python 3 pip."
# Allow failure. pyenv pip3 on travis is broken:
# https://github.com/travis-ci/travis-ci/issues/8363
diff --git a/ci/build.bat b/ci/build.bat
index 3fa185f646..8bf310851e 100644
--- a/ci/build.bat
+++ b/ci/build.bat
@@ -6,19 +6,19 @@ if "%CONFIGURATION%" == "MINGW_32" (
set ARCH=x86_64
set BITS=64
if "%CONFIGURATION%" == "MINGW_64-gcov" (
- set USE_GCOV="-DUSE_GCOV=ON"
+ set "USE_GCOV=-DUSE_GCOV=ON"
)
) else if "%CONFIGURATION%" == "MSVC_32" (
- set CMAKE_GENERATOR="Visual Studio 15 2017"
+ set "CMAKE_GENERATOR=Visual Studio 15 2017"
) else if "%CONFIGURATION%" == "MSVC_64" (
- set CMAKE_GENERATOR="Visual Studio 15 2017 Win64"
+ set "CMAKE_GENERATOR=Visual Studio 15 2017 Win64"
)
if "%CONFIGURATION:~0,5%" == "MINGW" (
:: These are native MinGW builds, but they use the toolchain inside
:: MSYS2, this allows using all the dependencies and tools available
:: in MSYS2, but we cannot build inside the MSYS2 shell.
- set CMAKE_GENERATOR="MinGW Makefiles"
+ set "CMAKE_GENERATOR=MinGW Makefiles"
set CMAKE_GENERATOR_ARGS=VERBOSE=1
:: Add MinGW to the PATH and remove the Git directory because it
:: has a conflicting sh.exe
@@ -49,14 +49,14 @@ where.exe neovim-node-host.cmd || goto :error
mkdir .deps
cd .deps
-cmake -G %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error
+cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error
cmake --build . -- %CMAKE_GENERATOR_ARGS% || goto :error
cd ..
:: Build Neovim
mkdir build
cd build
-cmake -G %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error
+cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error
cmake --build . --config RelWithDebInfo -- %CMAKE_GENERATOR_ARGS% || goto :error
bin\nvim --version || goto :error
@@ -78,7 +78,7 @@ if defined USE_GCOV (
)
:: The default cpack in the PATH is not CMake
-set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH%
+set "PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH%"
:: Build artifacts
cpack -G ZIP -C RelWithDebInfo
if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo
diff --git a/ci/common/build.sh b/ci/common/build.sh
index 2748b15b0d..772b696969 100644
--- a/ci/common/build.sh
+++ b/ci/common/build.sh
@@ -1,5 +1,8 @@
top_make() {
- ${MAKE_CMD} "$@"
+ echo '================================================================================'
+ # Travis has 1.5 virtual cores according to:
+ # http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
+ ninja "$@"
}
build_make() {
@@ -17,14 +20,13 @@ build_deps() {
rm -rf "${DEPS_BUILD_DIR}"
- # If there is a valid cache and we're not forced to recompile,
- # use cached third-party dependencies.
- if test -f "${CACHE_MARKER}" && test "${BUILD_NVIM_DEPS}" != "true" ; then
+ # Use cached dependencies if $CACHE_MARKER exists.
+ if test -f "${CACHE_MARKER}" && ! test "${CACHE_ENABLE}" = "false" ; then
local statcmd="stat -c '%y'"
if test "${TRAVIS_OS_NAME}" = osx ; then
statcmd="stat -f '%Sm'"
fi
- echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))."
+ echo "Using third-party dependencies from Travis cache (last update: $(${statcmd} "${CACHE_MARKER}"))."
mkdir -p "$(dirname "${DEPS_BUILD_DIR}")"
mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}"
@@ -36,7 +38,7 @@ build_deps() {
# update CMake configuration and update to newer deps versions.
cd "${DEPS_BUILD_DIR}"
echo "Configuring with '${DEPS_CMAKE_FLAGS}'."
- CC= cmake ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/"
+ CC= cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/"
if ! top_make; then
exit 1
@@ -56,7 +58,7 @@ prepare_build() {
mkdir -p "${BUILD_DIR}"
cd "${BUILD_DIR}"
echo "Configuring with '${CMAKE_FLAGS} $@'."
- cmake ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
+ cmake -G Ninja ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
}
build_nvim() {
diff --git a/ci/install.sh b/ci/install.sh
index 60d9507bfb..053549d6db 100755
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -8,20 +8,23 @@ if [[ "${CI_TARGET}" == lint ]]; then
fi
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
+ brew install ninja
brew install gettext
brew reinstall -s libtool
fi
-# Use default CC to avoid compilation problems when installing Python modules.
-echo "Install neovim module for Python 2."
-CC=cc pip2.7 -q install --user --upgrade neovim
-
echo "Install neovim module for Python 3."
# Allow failure. pyenv pip3 on travis is broken:
# https://github.com/travis-ci/travis-ci/issues/8363
CC=cc pip3 -q install --user --upgrade neovim || true
if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then
+ # Update PATH for pip.
+ export PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH"
+ # Use default CC to avoid compilation problems when installing Python modules.
+ echo "Install neovim module for Python 2."
+ CC=cc pip2.7 -q install --user --upgrade neovim
+
echo "Install neovim RubyGem."
gem install --no-document --version ">= 0.2.0" neovim
fi
diff --git a/ci/run_lint.sh b/ci/run_lint.sh
index e7f6727448..ae9adb7c87 100755
--- a/ci/run_lint.sh
+++ b/ci/run_lint.sh
@@ -10,19 +10,19 @@ source "${CI_DIR}/common/suite.sh"
enter_suite 'clint'
-run_test 'top_make clint-full' clint
+run_test 'make clint-full' clint
exit_suite --continue
enter_suite 'testlint'
-run_test 'top_make testlint' testlint
+run_test 'make testlint' testlint
exit_suite --continue
enter_suite 'lualint'
-run_test 'top_make lualint' lualint
+run_test 'make lualint' lualint
exit_suite --continue
@@ -31,7 +31,7 @@ enter_suite single-includes
CLICOLOR_FORCE=1 run_test_wd \
--allow-hang \
10s \
- 'top_make check-single-includes' \
+ 'make check-single-includes' \
'csi_clean' \
single-includes
diff --git a/test/functional/api/server_notifications_spec.lua b/test/functional/api/server_notifications_spec.lua
index 9d7cfb9b78..1d64ae7103 100644
--- a/test/functional/api/server_notifications_spec.lua
+++ b/test/functional/api/server_notifications_spec.lua
@@ -1,7 +1,7 @@
local helpers = require('test.functional.helpers')(after_each)
-local eq, clear, eval, command, nvim, next_message =
+local eq, clear, eval, command, nvim, next_msg =
helpers.eq, helpers.clear, helpers.eval, helpers.command, helpers.nvim,
- helpers.next_message
+ helpers.next_msg
local meths = helpers.meths
describe('notify', function()
@@ -15,10 +15,10 @@ describe('notify', function()
describe('passing a valid channel id', function()
it('sends the notification/args to the corresponding channel', function()
eval('rpcnotify('..channel..', "test-event", 1, 2, 3)')
- eq({'notification', 'test-event', {1, 2, 3}}, next_message())
+ eq({'notification', 'test-event', {1, 2, 3}}, next_msg())
command('au FileType lua call rpcnotify('..channel..', "lua!")')
command('set filetype=lua')
- eq({'notification', 'lua!', {}}, next_message())
+ eq({'notification', 'lua!', {}}, next_msg())
end)
end)
@@ -28,13 +28,13 @@ describe('notify', function()
eval('rpcnotify(0, "event1", 1, 2, 3)')
eval('rpcnotify(0, "event2", 4, 5, 6)')
eval('rpcnotify(0, "event2", 7, 8, 9)')
- eq({'notification', 'event2', {4, 5, 6}}, next_message())
- eq({'notification', 'event2', {7, 8, 9}}, next_message())
+ eq({'notification', 'event2', {4, 5, 6}}, next_msg())
+ eq({'notification', 'event2', {7, 8, 9}}, next_msg())
nvim('unsubscribe', 'event2')
nvim('subscribe', 'event1')
eval('rpcnotify(0, "event2", 10, 11, 12)')
eval('rpcnotify(0, "event1", 13, 14, 15)')
- eq({'notification', 'event1', {13, 14, 15}}, next_message())
+ eq({'notification', 'event1', {13, 14, 15}}, next_msg())
end)
it('does not crash for deeply nested variable', function()
@@ -42,7 +42,7 @@ describe('notify', function()
local nest_level = 1000
meths.command(('call map(range(%u), "extend(g:, {\'l\': [g:l]})")'):format(nest_level - 1))
eval('rpcnotify('..channel..', "event", g:l)')
- local msg = next_message()
+ local msg = next_msg()
eq('notification', msg[1])
eq('event', msg[2])
local act_ret = msg[3]
diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua
index 37ac532d18..18229b54ff 100644
--- a/test/functional/api/server_requests_spec.lua
+++ b/test/functional/api/server_requests_spec.lua
@@ -6,7 +6,7 @@ local Paths = require('test.config.paths')
local clear, nvim, eval = helpers.clear, helpers.nvim, helpers.eval
local eq, neq, run, stop = helpers.eq, helpers.neq, helpers.run, helpers.stop
local nvim_prog, command, funcs = helpers.nvim_prog, helpers.command, helpers.funcs
-local source, next_message = helpers.source, helpers.next_message
+local source, next_msg = helpers.source, helpers.next_msg
local ok = helpers.ok
local meths = helpers.meths
local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv
@@ -258,12 +258,12 @@ describe('server -> client', function()
it('rpc and text stderr can be combined', function()
eq("ok",funcs.rpcrequest(jobid, "poll"))
funcs.rpcnotify(jobid, "ping")
- eq({'notification', 'pong', {}}, next_message())
+ eq({'notification', 'pong', {}}, next_msg())
eq("done!",funcs.rpcrequest(jobid, "write_stderr", "fluff\n"))
- eq({'notification', 'stderr', {0, {'fluff', ''}}}, next_message())
+ eq({'notification', 'stderr', {0, {'fluff', ''}}}, next_msg())
funcs.rpcrequest(jobid, "exit")
- eq({'notification', 'stderr', {0, {''}}}, next_message())
- eq({'notification', 'exit', {0, 0}}, next_message())
+ eq({'notification', 'stderr', {0, {''}}}, next_msg())
+ eq({'notification', 'exit', {0, 0}}, next_msg())
end)
end)
diff --git a/test/functional/autocmd/cmdline_spec.lua b/test/functional/autocmd/cmdline_spec.lua
index 8d56687f7d..8ea086fb46 100644
--- a/test/functional/autocmd/cmdline_spec.lua
+++ b/test/functional/autocmd/cmdline_spec.lua
@@ -5,7 +5,7 @@ local clear = helpers.clear
local command = helpers.command
local eq = helpers.eq
local expect = helpers.expect
-local next_msg = helpers.next_message
+local next_msg = helpers.next_msg
local feed = helpers.feed
local meths = helpers.meths
diff --git a/test/functional/core/channels_spec.lua b/test/functional/core/channels_spec.lua
index e9fc88c01b..f79f208b69 100644
--- a/test/functional/core/channels_spec.lua
+++ b/test/functional/core/channels_spec.lua
@@ -1,7 +1,7 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq,
- helpers.eval, helpers.next_message, helpers.ok, helpers.source
+ helpers.eval, helpers.next_msg, helpers.ok, helpers.source
local command, funcs, meths = helpers.command, helpers.funcs, helpers.meths
local sleep = helpers.sleep
local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index e3c93d4b5a..c5326aedfe 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local clear, eq, eval, exc_exec, feed_command, feed, insert, neq, next_msg, nvim,
nvim_dir, ok, source, write_file, mkdir, rmdir = helpers.clear,
helpers.eq, helpers.eval, helpers.exc_exec, helpers.feed_command, helpers.feed,
- helpers.insert, helpers.neq, helpers.next_message, helpers.nvim,
+ helpers.insert, helpers.neq, helpers.next_msg, helpers.nvim,
helpers.nvim_dir, helpers.ok, helpers.source,
helpers.write_file, helpers.mkdir, helpers.rmdir
local command = helpers.command
@@ -292,8 +292,16 @@ describe('jobs', function()
nvim('command', 'let g:job_opts.user = {"n": 5, "s": "str", "l": [1]}')
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
local data = {n = 5, s = 'str', l = {1}}
- eq({'notification', 'stdout', {data, {'foo', ''}}}, next_msg())
- eq({'notification', 'stdout', {data, {''}}}, next_msg())
+ expect_msg_seq(
+ { {'notification', 'stdout', {data, {'foo', ''}}},
+ {'notification', 'stdout', {data, {''}}},
+ },
+ -- Alternative sequence:
+ { {'notification', 'stdout', {data, {'foo'}}},
+ {'notification', 'stdout', {data, {'', ''}}},
+ {'notification', 'stdout', {data, {''}}},
+ }
+ )
eq({'notification', 'exit', {data, 0}}, next_msg())
end)
@@ -310,11 +318,12 @@ describe('jobs', function()
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
expect_msg_seq(
{ {'notification', 'stdout', {5, {'foo', ''} } },
- {'notification', 'stdout', {5, {''} } }
+ {'notification', 'stdout', {5, {''} } },
},
-- Alternative sequence:
{ {'notification', 'stdout', {5, {'foo'} } },
- {'notification', 'stdout', {5, {'', ''} } }
+ {'notification', 'stdout', {5, {'', ''} } },
+ {'notification', 'stdout', {5, {''} } },
}
)
end)
@@ -417,7 +426,14 @@ describe('jobs', function()
let g:job_opts = {'on_stdout': Callback}
call jobstart('echo "some text"', g:job_opts)
]])
- eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
+ expect_msg_seq(
+ { {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
+ },
+ -- Alternative sequence:
+ { {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
+ {'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
+ }
+ )
end)
it('jobstart() works with closures', function()
@@ -430,7 +446,14 @@ describe('jobs', function()
let g:job_opts = {'on_stdout': MkFun()}
call jobstart('echo "some text"', g:job_opts)
]])
- eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
+ expect_msg_seq(
+ { {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
+ },
+ -- Alternative sequence:
+ { {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
+ {'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
+ }
+ )
end)
it('jobstart() works when closure passed directly to `jobstart`', function()
@@ -438,7 +461,14 @@ describe('jobs', function()
let g:job_opts = {'on_stdout': {id, data, event -> rpcnotify(g:channel, '1', 'foo', 'bar', Normalize(data), event)}}
call jobstart('echo "some text"', g:job_opts)
]])
- eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
+ expect_msg_seq(
+ { {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
+ },
+ -- Alternative sequence:
+ { {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
+ {'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
+ }
+ )
end)
describe('jobwait', function()
diff --git a/test/functional/ex_cmds/dict_notifications_spec.lua b/test/functional/ex_cmds/dict_notifications_spec.lua
index e3b4a1c504..3d550588e7 100644
--- a/test/functional/ex_cmds/dict_notifications_spec.lua
+++ b/test/functional/ex_cmds/dict_notifications_spec.lua
@@ -1,6 +1,6 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, nvim, source = helpers.clear, helpers.nvim, helpers.source
-local eq, next_msg = helpers.eq, helpers.next_message
+local eq, next_msg = helpers.eq, helpers.next_msg
local exc_exec = helpers.exc_exec
local command = helpers.command
local eval = helpers.eval
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 1f53200dd8..b8d912114d 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -97,14 +97,14 @@ local function request(method, ...)
return rv
end
-local function next_message(timeout)
- return session:next_message(timeout)
+local function next_msg(timeout)
+ return session:next_message(timeout and timeout or 10000)
end
local function expect_twostreams(msgs1, msgs2)
local pos1, pos2 = 1, 1
while pos1 <= #msgs1 or pos2 <= #msgs2 do
- local msg = next_message()
+ local msg = next_msg()
if pos1 <= #msgs1 and pcall(eq, msgs1[pos1], msg) then
pos1 = pos1 + 1
elseif pos2 <= #msgs2 then
@@ -117,7 +117,7 @@ local function expect_twostreams(msgs1, msgs2)
end
end
--- Expects a sequence of next_message() results. If multiple sequences are
+-- Expects a sequence of next_msg() results. If multiple sequences are
-- passed they are tried until one succeeds, in order of shortest to longest.
local function expect_msg_seq(...)
if select('#', ...) < 1 then
@@ -140,7 +140,7 @@ local function expect_msg_seq(...)
local expected_seq = seqs[anum]
-- Collect enough messages to compare the next expected sequence.
while #actual_seq < #expected_seq do
- local msg = next_message(10000) -- Big timeout for ASAN/valgrind.
+ local msg = next_msg(10000) -- Big timeout for ASAN/valgrind.
if msg == nil then
error(cat_err(final_error,
string.format('got %d messages, expected %d',
@@ -754,7 +754,7 @@ local module = {
mkdir = lfs.mkdir,
neq = neq,
new_pipename = new_pipename,
- next_message = next_message,
+ next_msg = next_msg,
nvim = nvim,
nvim_argv = nvim_argv,
nvim_async = nvim_async,
diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua
index 7d5521485c..8e62a37ef1 100644
--- a/test/functional/ui/input_spec.lua
+++ b/test/functional/ui/input_spec.lua
@@ -1,6 +1,6 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, feed_command, nvim = helpers.clear, helpers.feed_command, helpers.nvim
-local feed, next_message, eq = helpers.feed, helpers.next_message, helpers.eq
+local feed, next_msg, eq = helpers.feed, helpers.next_msg, helpers.eq
local expect = helpers.expect
local write_file = helpers.write_file
local Screen = require('test.functional.ui.screen')
@@ -16,7 +16,7 @@ describe('mappings', function()
local check_mapping = function(mapping, expected)
feed(mapping)
- eq({'notification', 'mapped', {expected}}, next_message())
+ eq({'notification', 'mapped', {expected}}, next_msg())
end
before_each(function()
diff --git a/third-party/cmake/BuildLuarocks.cmake b/third-party/cmake/BuildLuarocks.cmake
index 47c6412d86..f9960495fc 100644
--- a/third-party/cmake/BuildLuarocks.cmake
+++ b/third-party/cmake/BuildLuarocks.cmake
@@ -72,7 +72,7 @@ if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILING))
BuildLuarocks(
CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure
--prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS}
- INSTALL_COMMAND ${MAKE_PRG} bootstrap)
+ INSTALL_COMMAND ${MAKE_PRG} -j1 bootstrap)
elseif(MSVC OR MINGW)
if(MINGW)