authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-10-15 16:31:03+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2020-10-30 15:58:12+02:00
log570f610341e0b79a055bb5533ff4d11d0fe6534f
tree63277802238e824f89b7fb0e76a722ed679b7992
parent2020ca640e8db50f1cb5a1ceaa42c28a25483bad
signaturelock-open Commit is signed but in an unrecognized format.

stage2: fix test harness tmp path handling


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

src/test.zig+4-4
...@@ -463,10 +463,10 @@ pub const TestContext = struct {...@@ -463,10 +463,10 @@ pub const TestContext = struct {
463463
464 var cache_dir = try tmp.dir.makeOpenPath("zig-cache", .{});464 var cache_dir = try tmp.dir.makeOpenPath("zig-cache", .{});
465 defer cache_dir.close();465 defer cache_dir.close();
466 const bogus_path = "bogus"; // TODO this will need to be fixed before we can test LLVM extensions466 const tmp_path = try std.fs.path.join(arena, &[_][]const u8{ ".", "zig-cache", "tmp", &tmp.sub_path });
467 const zig_cache_directory: Compilation.Directory = .{467 const zig_cache_directory: Compilation.Directory = .{
468 .handle = cache_dir,468 .handle = cache_dir,
469 .path = try std.fs.path.join(arena, &[_][]const u8{ bogus_path, "zig-cache" }),469 .path = try std.fs.path.join(arena, &[_][]const u8{ tmp_path, "zig-cache" }),
470 };470 };
471471
472 const tmp_src_path = switch (case.extension) {472 const tmp_src_path = switch (case.extension) {
...@@ -475,7 +475,7 @@ pub const TestContext = struct {...@@ -475,7 +475,7 @@ pub const TestContext = struct {
475 };475 };
476476
477 var root_pkg: Package = .{477 var root_pkg: Package = .{
478 .root_src_directory = .{ .path = bogus_path, .handle = tmp.dir },478 .root_src_directory = .{ .path = tmp_path, .handle = tmp.dir },
479 .root_src_path = tmp_src_path,479 .root_src_path = tmp_src_path,
480 };480 };
481481
...@@ -488,7 +488,7 @@ pub const TestContext = struct {...@@ -488,7 +488,7 @@ pub const TestContext = struct {
488 });488 });
489489
490 const emit_directory: Compilation.Directory = .{490 const emit_directory: Compilation.Directory = .{
491 .path = bogus_path,491 .path = tmp_path,
492 .handle = tmp.dir,492 .handle = tmp.dir,
493 };493 };
494 const emit_bin: Compilation.EmitLoc = .{494 const emit_bin: Compilation.EmitLoc = .{