commit 570f610341e0b79a055bb5533ff4d11d0fe6534f (tree)
parent 2020ca640e8db50f1cb5a1ceaa42c28a25483bad
Author: Vexu <git@vexu.eu>
Date: Thu, 15 Oct 2020 16:31:03 +0300
stage2: fix test harness tmp path handling
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/test.zig b/src/test.zig
@@ -463,10 +463,10 @@ pub const TestContext = struct {
var cache_dir = try tmp.dir.makeOpenPath("zig-cache", .{});
defer cache_dir.close();
- const bogus_path = "bogus"; // TODO this will need to be fixed before we can test LLVM extensions
+ const tmp_path = try std.fs.path.join(arena, &[_][]const u8{ ".", "zig-cache", "tmp", &tmp.sub_path });
const zig_cache_directory: Compilation.Directory = .{
.handle = cache_dir,
- .path = try std.fs.path.join(arena, &[_][]const u8{ bogus_path, "zig-cache" }),
+ .path = try std.fs.path.join(arena, &[_][]const u8{ tmp_path, "zig-cache" }),
};
const tmp_src_path = switch (case.extension) {
@@ -475,7 +475,7 @@ pub const TestContext = struct {
};
var root_pkg: Package = .{
- .root_src_directory = .{ .path = bogus_path, .handle = tmp.dir },
+ .root_src_directory = .{ .path = tmp_path, .handle = tmp.dir },
.root_src_path = tmp_src_path,
};
@@ -488,7 +488,7 @@ pub const TestContext = struct {
});
const emit_directory: Compilation.Directory = .{
- .path = bogus_path,
+ .path = tmp_path,
.handle = tmp.dir,
};
const emit_bin: Compilation.EmitLoc = .{