aboutsummaryrefslogtreecommitdiff
path: root/test/runner.lua
Commit message (Collapse)AuthorAge
* test(harness): avoid overlong socket filename #41488Justin M. Keyes2026-08-25
| | | | | | | | | | | | | | | | | | | | | | Problem: Test sockets live under `$TMPDIR`, which the harness points at the build dir. On macOS/BSD `sockaddr_un.sun_path` is 104 bytes, and a CI build path plus "nvim.<pid>.<n>" leaves little room: /Users/runner/work/neovim/neovim/build/Xtest_tmpdir_terminal/nvim.runner/aBcDeF/nvim.12345.0 Solution: Point XDG_RUNTIME_DIR (`stdpath('run')`) at "/tmp/nvim_<pid>". 28 bytes: /tmp/nvim_19916/nvim.19919.1 TODO?: - `TEMP_DIR_NAMES` prefers `$TMPDIR` over `/tmp`, so on macOS `stdpath('run')` defaults to the long `/var/folders/<xx>/<…>/T/` path instead of the short `/tmp` alias. Note: - The 104-byte limit applies to the `bind()` arg, not its "realpath", to, so `/tmp/…` symlinks can be used to workaround the limit.
* test: fix $NVIM_LOG_FILE from environment being overwritten (#41420)zeertzjq2026-08-22
| | | | | Instead of setting it in the test runner (which runs in an Nvim instance that already has a log file), make run_tests.zig set a $NVIM_LOG_FILE fallback path like what RunTests.cmake does.
* refactor(test): unify XDG path handling (cmake vs zig)bfredl2026-07-06
| | | | fixes #40381
* fix(build.zig): do not depend on b.install_path on configure timebfredl2026-06-04
| | | | | | | | | | | | | | This is in preparation of zig 0.17 where b.install_path is no longer known inside `pub fn build()`. Builds which should hardcode a runtime path into the binary has to specify it. We could use a nlua0 helper to encode the install path at build time but I think this is cleaner anyway. (like currently the appimage still encodes a temporary build path which is nonsensical, it is better to just include none) Similarily b.args will not be available anymore (there will just be an opaque pass-through)
* test: run Lua harness with nvim -lLewis Russell2026-05-13
| | | | | | | | | | | | | | | | | | Problem: The Lua test harness still ran through standalone -ll mode, so tests depended on the low-level Lua path instead of the regular Nvim Lua environment. That also meant os.exit() coverage had to carry an ASAN workaround because Lua's raw process exit skipped Nvim teardown and let LeakSanitizer interfere with the observed exit code. Solution: Run the harness and related fixtures with nvim -l. Patch os.exit() in the main Lua state to exit through getout(), so scripts observe normal Nvim shutdown while standalone -ll remains available for generator-style scripts. As a consequence, the startup test can assert os.exit() without disabling leak detection. AI-assisted: Codex
* test: replace busted with local harnessLewis Russell2026-04-15
Replace the busted-based Lua test runner with a repo-local harness. The new harness runs spec files directly under `nvim -ll`, ships its own reporter and lightweight `luassert` shim, and keeps the helper/preload flow used by the functional and unit test suites. Keep the file boundary model shallow and busted-like by restoring `_G`, `package.loaded`, `package.preload`, `arg`, and the process environment between files, without carrying extra reset APIs or custom assertion machinery. Update the build and test entrypoints to use the new runner, add black-box coverage for the harness itself, and drop the bundled busted/luacheck dependency path. AI-assisted: Codex