forked from gentoo-utils/gentoo-utils
generate corpus to fuzz on with meson
This commit is contained in:
@@ -1,5 +1,20 @@
|
||||
cbindgen = find_program('cbindgen')
|
||||
|
||||
gencorpus = executable(
|
||||
'gencorpus',
|
||||
'gencorpus.rs',
|
||||
dependencies: [mon],
|
||||
link_with: [gentoo_utils],
|
||||
)
|
||||
|
||||
corpus_directory = meson.current_build_dir() / 'corpus'
|
||||
|
||||
corpus = custom_target(
|
||||
'corpus',
|
||||
output: 'corpus',
|
||||
command: [gencorpus, corpus_directory],
|
||||
)
|
||||
|
||||
fuzz_h = custom_target(
|
||||
'fuzz_h',
|
||||
input: 'fuzz.rs',
|
||||
@@ -20,8 +35,10 @@ fuzz_rs = static_library(
|
||||
link_with: [gentoo_utils],
|
||||
)
|
||||
|
||||
fuzz_cpp = executable(
|
||||
fuzz = executable(
|
||||
'fuzz',
|
||||
link_args: ['-fsanitize=fuzzer'],
|
||||
link_with: [fuzz_rs],
|
||||
)
|
||||
|
||||
test('fuzz', fuzz, args: [corpus_directory], depends: [corpus], timeout: 0)
|
||||
|
||||
Reference in New Issue
Block a user