test runner: always report fuzz tests

This way they can be smoke tested.
This commit is contained in:
Andrew Kelley committed 2024-07-25 18:52:21 -07:00
1 parent b501adccbe
commit 90dfd86ebe
1 file changed
+7 -14
+7 -14
View File
@@ -325,18 +325,11 @@ extern fn fuzzer_next() FuzzerSlice;
pub fn fuzzInput(options: testing.FuzzInputOptions) []const u8 {
@disableInstrumentation();
if (crippled) {
return "";
} else if (builtin.fuzz) {
return fuzzer_next().toSlice();
} else {
is_fuzz_test = true;
if (options.corpus.len == 0) {
return "";
} else {
var prng = std.Random.DefaultPrng.init(testing.random_seed);
const random = prng.random();
return options.corpus[random.uintLessThan(usize, options.corpus.len)];
}
}
if (crippled) return "";
is_fuzz_test = true;
if (builtin.fuzz) return fuzzer_next().toSlice();
if (options.corpus.len == 0) return "";
var prng = std.Random.DefaultPrng.init(testing.random_seed);
const random = prng.random();
return options.corpus[random.uintLessThan(usize, options.corpus.len)];
}