fuzzWorkerRun
Function parameters
Parameters
- fuzz:*Fuzz
- run:*Step.Run
- unit_test_index:u32
Type definitions in this namespace
Types
Functions in this namespace
Functions
Source
Implementation
fn fuzzWorkerRun(
fuzz: *Fuzz,
run: *Step.Run,
unit_test_index: u32,
) void {
const gpa = run.step.owner.allocator;
const test_name = run.cached_test_metadata.?.testName(unit_test_index);
const prog_node = fuzz.prog_node.start(test_name, 0);
defer prog_node.end();
run.rerunInFuzzMode(fuzz, unit_test_index, prog_node) catch |err| switch (err) {
error.MakeFailed => {
var buf: [256]u8 = undefined;
const w = std.debug.lockStderrWriter(&buf);
defer std.debug.unlockStderrWriter();
build_runner.printErrorMessages(gpa, &run.step, .{ .ttyconf = fuzz.ws.ttyconf }, w, false) catch {};
return;
},
else => {
log.err("step '{s}': failed to rerun '{s}' in fuzz mode: {s}", .{
run.step.name, test_name, @errorName(err),
});
return;
},
};
}