mirror of
https://github.com/ziglang/zig.git
synced 2024-11-21 11:32:24 +00:00
Merge fa5006819f
into f845fa04a0
This commit is contained in:
commit
4d421e94a5
@ -841,6 +841,10 @@ fn printStepStatus(
|
||||
.skipped, .skipped_oom => |skip| {
|
||||
try ttyconf.setColor(stderr, .yellow);
|
||||
try stderr.writeAll(" skipped");
|
||||
if (s.result_skip_reason) |reason| {
|
||||
try stderr.writeAll(": ");
|
||||
try stderr.writeAll(reason);
|
||||
}
|
||||
if (skip == .skipped_oom) {
|
||||
try stderr.writeAll(" (not enough memory)");
|
||||
try ttyconf.setColor(stderr, .dim);
|
||||
|
@ -39,6 +39,7 @@ state: State,
|
||||
/// total system memory available.
|
||||
max_rss: usize,
|
||||
|
||||
result_skip_reason: ?[]const u8 = null,
|
||||
result_error_msgs: std.ArrayListUnmanaged([]const u8),
|
||||
result_error_bundle: std.zig.ErrorBundle,
|
||||
result_stderr: []const u8,
|
||||
|
@ -1017,7 +1017,10 @@ fn runCommand(
|
||||
.link_libc = exe.is_linking_libc,
|
||||
})) {
|
||||
.native, .rosetta => {
|
||||
if (allow_skip) return error.MakeSkipped;
|
||||
if (allow_skip) {
|
||||
run.step.result_skip_reason = "Invalid binary";
|
||||
return error.MakeSkipped;
|
||||
}
|
||||
break :interpret;
|
||||
},
|
||||
.wine => |bin_name| {
|
||||
@ -1098,7 +1101,10 @@ fn runCommand(
|
||||
}
|
||||
},
|
||||
.bad_dl => |foreign_dl| {
|
||||
if (allow_skip) return error.MakeSkipped;
|
||||
if (allow_skip) {
|
||||
run.step.result_skip_reason = "Invalid binary";
|
||||
return error.MakeSkipped;
|
||||
}
|
||||
|
||||
const host_dl = b.graph.host.result.dynamic_linker.get() orelse "(none)";
|
||||
|
||||
@ -1110,7 +1116,10 @@ fn runCommand(
|
||||
, .{ host_dl, foreign_dl });
|
||||
},
|
||||
.bad_os_or_cpu => {
|
||||
if (allow_skip) return error.MakeSkipped;
|
||||
if (allow_skip) {
|
||||
run.step.result_skip_reason = "Invalid os or cpu";
|
||||
return error.MakeSkipped;
|
||||
}
|
||||
|
||||
const host_name = try b.graph.host.result.zigTriple(b.allocator);
|
||||
const foreign_name = try exe.rootModuleTarget().zigTriple(b.allocator);
|
||||
@ -1129,7 +1138,10 @@ fn runCommand(
|
||||
try Step.handleVerbose2(step.owner, cwd, run.env_map, interp_argv.items);
|
||||
|
||||
break :term spawnChildAndCollect(run, interp_argv.items, has_side_effects, prog_node, fuzz_context) catch |e| {
|
||||
if (!run.failing_to_execute_foreign_is_an_error) return error.MakeSkipped;
|
||||
if (!run.failing_to_execute_foreign_is_an_error) {
|
||||
run.step.result_skip_reason = "Foreign binary failed";
|
||||
return error.MakeSkipped;
|
||||
}
|
||||
|
||||
return step.fail("unable to spawn interpreter {s}: {s}", .{
|
||||
interp_argv.items[0], @errorName(e),
|
||||
@ -1736,8 +1748,10 @@ fn failForeign(
|
||||
) error{ MakeFailed, MakeSkipped, OutOfMemory } {
|
||||
switch (run.stdio) {
|
||||
.check, .zig_test => {
|
||||
if (run.skip_foreign_checks)
|
||||
if (run.skip_foreign_checks) {
|
||||
run.step.result_skip_reason = "Foreign binary failed";
|
||||
return error.MakeSkipped;
|
||||
}
|
||||
|
||||
const b = run.step.owner;
|
||||
const host_name = try b.graph.host.result.zigTriple(b.allocator);
|
||||
|
Loading…
Reference in New Issue
Block a user