test: runner loads Lua modules from system install #42582

This commit is contained in:
Justin M. Keyes authored and GitHub committed 2026-10-29 19:07:13 -04:00
1 parent 9290926ccf
commit e0516a46e8
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ else()
endif()
set(ENV{NVIM_TEST} "1")
# The runner's own Lua uses this runtime, not one installed under the install prefix.
# Test runner should use the runtime from the build, not the system install (if any).
set(ENV{VIMRUNTIME} ${ROOT_DIR}/runtime)
# Set LC_ALL to meet expectations of some locale-sensitive tests.
set(ENV{LC_ALL} "en_US.UTF-8")
+2
View File
@@ -21,6 +21,8 @@ pub fn testStep(b: *std.Build, kind: []const u8, nvim_bin: *std.Build.Step.Compi
const env = test_step.getEnvMap();
try env.put("NVIM_TEST", "1");
// Test runner should use the runtime from the build, not the system install (if any).
try env.put("VIMRUNTIME", try b.build_root.join(b.graph.arena, &.{"runtime"}));
if (env.get("NVIM_LOG_FILE") == null) {
try env.put("NVIM_LOG_FILE", b.fmt("{s}/nvim.log", .{b.install_path}));
}