zig

fork of https://codeberg.org/ziglang/zig
Log | Tree | Refs | README | LICENSE

commit 423d7b848b1953173df99fde1f83166dc68c2a2c (tree)
parent 539e0b0469457e6f3732f9d417cf023d7a1f1b68
Author: Manlio Perillo <manlio.perillo@gmail.com>
Date:   Fri, 24 Mar 2023 21:50:02 +0100

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

Diffstat:
Mtest/src/Cases.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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.?);