diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-11-16 21:57:40 +0000 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-11-16 21:57:40 +0000 |
| commit | b360132b9992bf2f242a6ce0927464d6d04ffa02 (patch) | |
| tree | b40ac72e6ffbb69bcf7942a8c6369d9bc20fa7fc /fuzz/meson.build | |
| parent | 424bd9d0720e3752c6ff252c6eb0a3425109b765 (diff) | |
| download | gentoo-utils-b360132b9992bf2f242a6ce0927464d6d04ffa02.tar.gz | |
generate corpus to fuzz on with meson
Diffstat (limited to 'fuzz/meson.build')
| -rw-r--r-- | fuzz/meson.build | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/fuzz/meson.build b/fuzz/meson.build index c4b5e8d..d6809f6 100644 --- a/fuzz/meson.build +++ b/fuzz/meson.build @@ -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) |
