From 423d7b848b1953173df99fde1f83166dc68c2a2c Mon Sep 17 00:00:00 2001 From: Manlio Perillo Date: Fri, 24 Mar 2023 21:50:02 +0100 Subject: [PATCH] test/src/Cases: fix incorrect code to find zig_lib_directory The runCases function incorrectly called the introspect.findZigLibDir function, causing a possible error, depending on the location of the local cache directory, since the current executable is check-case. Use findZigLibDirFromSelfExe, passing the zig_exe_path argument. The current CI scripts work correctly because ZIG_LOCAL_CACHE_DIR is set to "$(pwd)/zig-local-cache". Fixes #15044 --- test/src/Cases.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/Cases.zig b/test/src/Cases.zig index 48b1fd459d..b1f11129e4 100644 --- a/test/src/Cases.zig +++ b/test/src/Cases.zig @@ -1154,7 +1154,7 @@ fn runCases(self: *Cases, zig_exe_path: []const u8) !void { progress.terminal = null; defer root_node.end(); - var zig_lib_directory = try introspect.findZigLibDir(self.gpa); + var zig_lib_directory = try introspect.findZigLibDirFromSelfExe(self.gpa, zig_exe_path); defer zig_lib_directory.handle.close(); defer self.gpa.free(zig_lib_directory.path.?);