Skip to content

Commit 90dfd86

Browse files
committed
test runner: always report fuzz tests
This way they can be smoke tested.
1 parent b501adc commit 90dfd86

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

lib/compiler/test_runner.zig

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -325,18 +325,11 @@ extern fn fuzzer_next() FuzzerSlice;
325325

326326
pub fn fuzzInput(options: testing.FuzzInputOptions) []const u8 {
327327
@disableInstrumentation();
328-
if (crippled) {
329-
return "";
330-
} else if (builtin.fuzz) {
331-
return fuzzer_next().toSlice();
332-
} else {
333-
is_fuzz_test = true;
334-
if (options.corpus.len == 0) {
335-
return "";
336-
} else {
337-
var prng = std.Random.DefaultPrng.init(testing.random_seed);
338-
const random = prng.random();
339-
return options.corpus[random.uintLessThan(usize, options.corpus.len)];
340-
}
341-
}
328+
if (crippled) return "";
329+
is_fuzz_test = true;
330+
if (builtin.fuzz) return fuzzer_next().toSlice();
331+
if (options.corpus.len == 0) return "";
332+
var prng = std.Random.DefaultPrng.init(testing.random_seed);
333+
const random = prng.random();
334+
return options.corpus[random.uintLessThan(usize, options.corpus.len)];
342335
}

0 commit comments

Comments
 (0)