libpsl/fuzz/meson.build

26 lines
746 B
Meson
Raw Normal View History

2018-12-06 15:16:13 +01:00
fuzzer_cargs = [
'-DSRCDIR="@0@"'.format(meson.current_source_dir()),
2018-12-06 15:16:13 +01:00
'-DTEST_RUN',
]
2018-12-08 16:11:17 +01:00
foreach test_case : ['fuzzer', 'load_fuzzer', 'load_dafsa_fuzzer']
if enable_runtime == 'libidn2'
test_name = 'libpsl_idn2_' + test_case
elif enable_runtime == 'libicu'
test_name = 'libpsl_icu_' + test_case
elif enable_runtime == 'libidn'
test_name = 'libpsl_idn_' + test_case
else
test_name = 'libpsl_' + test_case
endif
source_file = 'libpsl_@0@.c'.format(test_case)
2018-12-06 15:16:13 +01:00
exe = executable(test_name, source_file, 'main.c',
link_with : libpsl,
c_args : fuzzer_cargs,
include_directories : [configinc, includedir],
dependencies : libicu_dep,
link_language : link_language
)
2018-12-06 15:16:13 +01:00
test(test_name, exe)
endforeach