Hash :
7ba3efa5
Author :
Date :
2025-02-09T18:42:45
[tests/fuzzing] Use the correct dirs for subset and repacker fuzzers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
tests = [
'hb-shape-fuzzer.cc',
'hb-subset-fuzzer.cc',
'hb-set-fuzzer.cc',
'hb-draw-fuzzer.cc',
'hb-repacker-fuzzer.cc',
]
foreach file_name : tests
test_name = file_name.split('.')[0]
sources = [file_name]
fuzzer_ldflags = []
extra_cpp_args = []
if get_option('fuzzer_ldflags') == ''
sources += 'main.cc'
else
fuzzer_ldflags += get_option('fuzzer_ldflags').split()
extra_cpp_args += '-DHB_IS_IN_FUZZER'
endif
if get_option('experimental_api')
extra_cpp_args += '-DHB_EXPERIMENTAL_API'
endif
exe = executable(test_name, sources,
cpp_args: cpp_args + extra_cpp_args,
include_directories: [incconfig, incsrc],
link_args: fuzzer_ldflags,
link_with: [libharfbuzz, libharfbuzz_subset],
install: false,
)
set_variable('@0@_exe'.format(test_name.underscorify()), exe)
endforeach
test('shape-fuzzer', find_program('run-fuzzer-tests.py'),
args: [
hb_shape_fuzzer_exe,
meson.current_source_dir() / 'fonts',
],
depends: [hb_shape_fuzzer_exe, libharfbuzz, libharfbuzz_subset],
workdir: meson.current_build_dir() / '..' / '..',
priority: 1,
suite: ['fuzzing'],
)
test('subset-fuzzer', find_program('run-fuzzer-tests.py'),
args: [
hb_subset_fuzzer_exe,
meson.current_source_dir() / 'fonts',
meson.current_source_dir() / '..' / 'subset' / 'data' / 'fonts',
],
workdir: meson.current_build_dir() / '..' / '..',
priority: 1,
suite: ['fuzzing'],
)
test('repacker-fuzzer', find_program('run-fuzzer-tests.py'),
args: [
hb_repacker_fuzzer_exe,
meson.current_source_dir() / 'graphs',
],
workdir: meson.current_build_dir() / '..' / '..',
priority: 1,
suite: ['fuzzing'],
)
test('draw-fuzzer', find_program('run-fuzzer-tests.py'),
args: [
hb_draw_fuzzer_exe,
meson.current_source_dir() / 'fonts',
],
workdir: meson.current_build_dir() / '..' / '..',
suite: ['fuzzing'],
)