From 570f610341e0b79a055bb5533ff4d11d0fe6534f Mon Sep 17 00:00:00 2001 From: Vexu Date: Thu, 15 Oct 2020 16:31:03 +0300 Subject: [PATCH] stage2: fix test harness tmp path handling --- src/test.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test.zig b/src/test.zig index c0ac56aa2d..44c9bfd8fc 100644 --- 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 = .{