| Commit message (Collapse) | Author | Age |
|
|
|
| |
This allows us to get rid of the separate "nvim-test" target
|
|
|
|
| |
YAGNI. These were disabled 5 years ago in lint commit 29ed5b3a39abb84d6af602b2d0a7680d9dab381c
|
|
|
|
|
|
|
|
| |
unittests relied on the exact setup of coredumps on CI to detect
process crashing, and otherwise completely discarded errors.
Dectect child process failure reliably using process status, so that
unittests actually work locally as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Dirs "config", "packaging", and "third-party" are all closely related
but this is not obvious from the layout. This adds friction for new
contributors.
Solution:
- rename config/ to cmake.config/
- rename test/config/ to test/cmakeconfig/ because it is used in Lua
tests: require('test.cmakeconfig.paths').
- rename packaging/ to cmake.packaging/
- rename third-party/ to cmake.deps/ (parallel with .deps/)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fs_init() must be called before early_init() in init/helpers.lua
If I run 'make unittest' on my Mac (macOS 10.14/Mojave or 12/Big Sur, intel
CPU), every test produce a core dump.
Call sequence in the core is:
early_init() main.c:197
set_init_1() option.c:508
runtimepath_default() runtime.c:1205
get_lib_dir() runtime.c:1175
os_isdir() fs.c:137
os_getperm() fs.c:777
os_stat() fs.c:761
fs_loop_lock() fs.c:72
uv_mutex_lock(&fs_loop_mutex) thread.c:352
abort()
.deps/build/src/libuv/src/unix/thread.c:
void uv_mutex_lock(uv_mutex_t* mutex) {
if (pthread_mutex_lock(mutex))
abort(); // line 352
}
So pthread_mutex_lock(&fs_loop_mutex) failed. The reason seems to be simple.
fs_init() was not called and fs_loop_mutex has not been initialized. fs_init()
was moved out from early_init() in main.c by
b87867e69e94d9784468a126f21c721446f080de, but unit/helpers.lua was not updated
accordingly.
|
|
|
|
|
|
| |
Problem: Custom plugins loaded with --clean.
Solution: Do not include the home directory in 'runtimepath'.
https://github.com/vim/vim/commit/072687032683b1994d25a114893d9a6f8bc36612
|
| |
|
|
|
|
| |
Traces are not useful normally (unless debugging/fixing tests), but only add
overhead. Disable them by default.
|
|
|
|
| |
This might help to have more information in case of errors, like
mentioned in https://github.com/neovim/neovim/commit/eec529cf9e.
|
|\
| |
| |
| | |
ref #8288
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is where "pure functions" can live, which can be shared by Nvim and
test logic which may not have a running Nvim instance available.
If in the future we use Nvim itself as the Lua engine for tests, then
these functions could be moved directly onto the `vim` Lua module.
closes #6580
|
|/
|
|
|
|
|
|
| |
Automatically include all "global helper" util functions in the
unit.helpers and functional.helpers and modules. So tests don't need to
expicitly do:
local global_helpers = require('test.helpers')
|
|
|
|
|
|
|
|
|
|
|
| |
- Minimum required libuv is now v1.12
- Because `uv_os_getenv` requires allocating, we must manage a map
(`envmap` in `env.c`) to maintain the old behavior of `os_getenv` .
- free() map-items after removal. khash.h does not make copies of
anything, so even its keys must be memory-managed by the caller.
closes #8398
closes #9267
|
|\ |
|
| |
| |
| |
| | |
Previously, we ignored only _Float128. But glibc 2.27 added _Float32
and _Float32x. Rather than play whack-a-mole, ignore everything.
|
| |
| |
| |
| |
| | |
Reason: test may contain cleanup at the endwhich is needed for GC to work
properly, but is not done if test fails. With collectgarbage() in former
position it would crash when collecting garbage.
|
| | |
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | | |
Also improves error reporting.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently supported nodes:
- Register as it is one of the simplest value nodes (even numbers are
not that simple with that dot handling).
- Plus, both unary and binary.
- Parenthesis, both nesting and calling.
Note regarding unit tests: it stores data for AST in highlighting in
strings in place of tables because luassert fails to do a good job at
representing big tables. Squashing a bunch of data into a single string
simply yields more readable result.
|
| | | |
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When building with certain GCC versions, a _Float128 type is present
when setting up the ffi for unit tests.
./test/unit/helpers.lua:256: declaration specifier expected near '_Float128' at line 396
/usr/bin/luajit: /usr/share/lua/5.1/busted/runner.lua:99: attempt to concatenate local 'message' (a table value)
stack traceback:
/usr/share/lua/5.1/busted/runner.lua:99: in function 'fn'
/usr/share/lua/5.1/mediator.lua:103: in function 'publish'
/usr/share/lua/5.1/busted/modules/helper_loader.lua:21: in function 'helperLoader'
/usr/share/lua/5.1/busted/runner.lua:147: in function </usr/share/lua/5.1/busted/runner.lua:11>
/usr/bin/busted:3: in main chunk
[C]: at 0x004044a0
CMake Error at /<<PKGBUILDDIR>>/cmake/RunTests.cmake:53 (message):
Running unit tests failed with error: 1.
Since this is being pulled in by a dependency, not directly used by
nvim, just ignore the type.
Closes #7423
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Benchmarks:
Before change: 17.78s user 3.48s system 94% cpu 22.525 total
After change: 25.38s user 4.46s system 101% cpu 29.317 total
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Some benchmarks:
TRACE_EVERYTHING: 79.45s user 12.68s system 124% cpu 1:13.94 total
(default): 30.26s user 5.30s system 89% cpu 39.663 total
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some benchmarks:
MAIN_CDEFS + NO_TRACE: 3.81s user 1.65s system 33% cpu 16.140 total
MAIN_CDEFS: 73.61s user 10.98s system 154% cpu 54.690 total
NO_TRACE: 18.49s user 4.30s system 73% cpu 30.804 total
(default): 77.11s user 14.74s system 126% cpu 1:12.79 total
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Slows down unit tests much, but gets rid of as much preserved state as possible.
|
| |
|