spank-olm

WIP Do not look
git clone git://archive.git.mtrnord.blog/MTRNord/spank-olm.git
Log | Files | Refs | README | LICENSE

meson.build (1319B)


      1 fuzz_deps = spank_olm_deps
      2 fuzz_ldflags = []
      3 
      4 if get_option('fuzzer_ldflags') != ''
      5     fuzz_ldflags += [get_option('fuzzer_ldflags')]
      6 endif
      7 
      8 if fuzzing_engine == 'none'
      9     standalone_engine = static_library('standalone_engine',
     10                                        'StandaloneFuzzTargetMain.c'
     11     )
     12     fuzz_deps += declare_dependency(link_with : standalone_engine)
     13 elif fuzzing_engine == 'libfuzzer'
     14     fuzz_ldflags += ['-fsanitize=fuzzer']
     15 endif
     16 
     17 fuzz_progs = [
     18     'olm_sign_fuzzer'
     19 ]
     20 
     21 fuzz_execs = []
     22 foreach fuzz_prog : fuzz_progs
     23     fuzz_execs += executable(fuzz_prog,
     24                              fuzz_prog + '.cpp',
     25                              dependencies : [spank_olm_dep, fuzz_deps],
     26                              link_args : fuzz_ldflags
     27     )
     28 endforeach
     29 
     30 # If the fuzzing engine is not OSS-Fuzz, build the unit tests to be run on CI
     31 if fuzzing_engine != 'oss-fuzz'
     32     test_fuzz = configure_file(
     33         input : 'test_fuzz.sh',
     34         output : 'test_fuzz.sh',
     35         copy : true,
     36     )
     37 
     38     test(
     39         'fuzz',
     40         test_fuzz,
     41         workdir : meson.current_build_dir(),
     42         depends : [
     43             fuzz_execs,
     44         ],
     45         # Increase the timeout as running the tests with sanitizers
     46         # enabled could be slower than the default 30 seconds.
     47         timeout : 60,
     48     )
     49 endif