mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
test/link/macho: test for signals only when running on the host
This commit is contained in:
parent
4ebd0036fd
commit
ca86dc61dd
@ -1242,9 +1242,10 @@ fn testRelocatableZig(b: *Build, opts: Options) *Step {
|
||||
if (opts.use_llvm) {
|
||||
// TODO: enable this once self-hosted can print panics and stack traces
|
||||
run.addCheck(.{ .expect_stderr_match = b.dupe("panic: Oh no!") });
|
||||
run.addCheck(.{ .expect_term = .{ .Signal = std.os.darwin.SIG.ABRT } });
|
||||
} else {
|
||||
run.addCheck(.{ .expect_term = .{ .Signal = std.os.darwin.SIG.TRAP } });
|
||||
}
|
||||
if (builtin.os.tag == .macos) {
|
||||
const signal: u32 = if (opts.use_llvm) std.os.darwin.SIG.ABRT else std.os.darwin.SIG.TRAP;
|
||||
run.addCheck(.{ .expect_term = .{ .Signal = signal } });
|
||||
}
|
||||
test_step.dependOn(&run.step);
|
||||
|
||||
@ -2318,6 +2319,7 @@ fn addTestStep(b: *Build, comptime prefix: []const u8, opts: Options) *Step {
|
||||
return link.addTestStep(b, "macho-" ++ prefix, opts);
|
||||
}
|
||||
|
||||
const builtin = @import("builtin");
|
||||
const addAsmSourceBytes = link.addAsmSourceBytes;
|
||||
const addCSourceBytes = link.addCSourceBytes;
|
||||
const addRunArtifact = link.addRunArtifact;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user