mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
fuzzing: Add unit tests to check fuzzers
Test the fuzzers with one arbitrary input each, to ensure that they work at a very basic level. This should catch regressions in each of the fuzzers without having to wait for them to be picked up by oss-fuzz. These tests can be run using `meson test --suite fuzzing`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
0c6a1af9d6
commit
fa5947d3e7
@ -38,4 +38,14 @@ foreach target_name : fuzz_targets
|
||||
c_args : extra_c_args,
|
||||
dependencies : deps,
|
||||
)
|
||||
|
||||
# If the FuzzingEngine isn’t available, build some unit tests to check that
|
||||
# the fuzzing files do basically work. This doesn’t do any actual fuzzing though.
|
||||
# Pass in the README as an arbitrary fuzzing input, just so we have something.
|
||||
if not fuzzing_engine.found()
|
||||
test(target_name, exe,
|
||||
args : files('README.md'),
|
||||
suite : 'fuzzing',
|
||||
)
|
||||
endif
|
||||
endforeach
|
||||
|
Loading…
Reference in New Issue
Block a user