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 {
463463
464464 var cache_dir = try tmp.dir.makeOpenPath("zig-cache", .{});
465465 defer cache_dir.close();
466 const bogus_path = "bogus"; // TODO this will need to be fixed before we can test LLVM extensions
466 const tmp_path = try std.fs.path.join(arena, &[_][]const u8{ ".", "zig-cache", "tmp", &tmp.sub_path });
467467 const zig_cache_directory: Compilation.Directory = .{
468468 .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" }),
470470 };
471471
472472 const tmp_src_path = switch (case.extension) {
......@@ -475,7 +475,7 @@ pub const TestContext = struct {
475475 };
476476
477477 var root_pkg: Package = .{
478 .root_src_directory = .{ .path = bogus_path, .handle = tmp.dir },
478 .root_src_directory = .{ .path = tmp_path, .handle = tmp.dir },
479479 .root_src_path = tmp_src_path,
480480 };
481481
......@@ -488,7 +488,7 @@ pub const TestContext = struct {
488488 });
489489
490490 const emit_directory: Compilation.Directory = .{
491 .path = bogus_path,
491 .path = tmp_path,
492492 .handle = tmp.dir,
493493 };
494494 const emit_bin: Compilation.EmitLoc = .{