aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-01-05 02:35:52 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-01-05 02:35:52 -0500
commit157b8e68894df4b4497f9caa5275dc4d22b0efca (patch)
tree62c8d5d483e03e507abc32f83bd6ce9e82972496 /test
parenta690a5085ddbfb540cf07db146645a9f8a4e92f6 (diff)
downloadzig-157b8e68894df4b4497f9caa5275dc4d22b0efca.tar.gz
zig-157b8e68894df4b4497f9caa5275dc4d22b0efca.zip
fix test-stack-traces regression
Diffstat (limited to 'test')
-rw-r--r--test/tests.zig12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/tests.zig b/test/tests.zig
index c178364308..ae9b68c844 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -517,11 +517,6 @@ pub const StackTracesContext = struct {
) void {
const b = self.b;
- const source_pathname = fs.path.join(
- b.allocator,
- &[_][]const u8{ b.cache_root, "source.zig" },
- ) catch unreachable;
-
for (self.modes) |mode| {
const expect_for_mode = expect[@enumToInt(mode)];
if (expect_for_mode.len == 0) continue;
@@ -535,12 +530,11 @@ pub const StackTracesContext = struct {
if (mem.indexOf(u8, annotated_case_name, filter) == null) continue;
}
- const exe = b.addExecutable("test", source_pathname);
+ const src_basename = "source.zig";
+ const write_src = b.addWriteFile(src_basename, source);
+ const exe = b.addExecutableFromWriteFileStep("test", write_src, src_basename);
exe.setBuildMode(mode);
- const write_source = b.addWriteFile(source_pathname, source);
- exe.step.dependOn(&write_source.step);
-
const run_and_compare = RunAndCompareStep.create(
self,
exe,