mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
update fuzzing for build system changes
This commit is contained in:
parent
16fc083f2b
commit
35d55222cf
1 changed files with 20 additions and 0 deletions
|
|
@ -142,6 +142,15 @@ pub fn start(fuzz: *Fuzz) void {
|
|||
};
|
||||
}
|
||||
|
||||
for (fuzz.run_steps) |run| {
|
||||
if (run.fuzz_tests.items.len > 1) {
|
||||
// Multiple fuzzWorkerRuns currently cause race-
|
||||
// conditions since they use the same Run step.
|
||||
fuzz.wait_group.finish();
|
||||
fatal("--fuzz not yet implemented for multiple tests", .{});
|
||||
}
|
||||
}
|
||||
|
||||
for (fuzz.run_steps) |run| {
|
||||
for (run.fuzz_tests.items) |unit_test_index| {
|
||||
assert(run.rebuilt_executable != null);
|
||||
|
|
@ -218,6 +227,17 @@ fn fuzzWorkerRun(
|
|||
return;
|
||||
},
|
||||
};
|
||||
|
||||
const show_compile_errors = run.step.result_error_bundle.errorMessageCount() > 0;
|
||||
const show_error_msgs = run.step.result_error_msgs.items.len > 0;
|
||||
const show_stderr = run.step.result_stderr.len > 0;
|
||||
|
||||
if (show_error_msgs or show_compile_errors or show_stderr) {
|
||||
var buf: [256]u8 = undefined;
|
||||
const w, _ = std.debug.lockStderrWriter(&buf);
|
||||
defer std.debug.unlockStderrWriter();
|
||||
build_runner.printErrorMessages(gpa, &run.step, .{}, w, fuzz.ttyconf, .verbose, .indent) catch {};
|
||||
}
|
||||
}
|
||||
|
||||
pub fn serveSourcesTar(fuzz: *Fuzz, req: *std.http.Server.Request) !void {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue