From e0516a46e8cead23e119cd298ef5eea8a570a1de Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 29 Oct 2026 19:07:13 -0400 Subject: [PATCH] test: runner loads Lua modules from system install #42582 --- cmake/RunTests.cmake | 2 +- test/run_tests.zig | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/RunTests.cmake b/cmake/RunTests.cmake index bafba00b30..afd61ac45c 100644 --- a/cmake/RunTests.cmake +++ b/cmake/RunTests.cmake @@ -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") diff --git a/test/run_tests.zig b/test/run_tests.zig index 4a627bb1d3..603e9261fd 100644 --- a/test/run_tests.zig +++ b/test/run_tests.zig @@ -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})); }