authorgravatar for manlio.perillo@gmail.comManlio Perillo <manlio.perillo@gmail.com> 2023-03-24 21:50:02+01:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-06-18 18:20:42-07:00
log423d7b848b1953173df99fde1f83166dc68c2a2c
tree851bc6bbccfff2b8b85ae60471f535ce5e4b3f58
parent539e0b0469457e6f3732f9d417cf023d7a1f1b68

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

1 files changed, 1 insertions(+), 1 deletions(-)

test/src/Cases.zig+1-1
...@@ -1154,7 +1154,7 @@ fn runCases(self: *Cases, zig_exe_path: []const u8) !void {...@@ -1154,7 +1154,7 @@ fn runCases(self: *Cases, zig_exe_path: []const u8) !void {
1154 progress.terminal = null;1154 progress.terminal = null;
1155 defer root_node.end();1155 defer root_node.end();
11561156
1157 var zig_lib_directory = try introspect.findZigLibDir(self.gpa);1157 var zig_lib_directory = try introspect.findZigLibDirFromSelfExe(self.gpa, zig_exe_path);
1158 defer zig_lib_directory.handle.close();1158 defer zig_lib_directory.handle.close();
1159 defer self.gpa.free(zig_lib_directory.path.?);1159 defer self.gpa.free(zig_lib_directory.path.?);
11601160