harfbuzz/test/fuzzing/meson.build
Christoph Reiter 03bd6ead44 [meson] Only pass required dependencies to everything
Instead of passing dependencies as required we used one giant shared
dependency list containing all dependencies for every library/executable.
While this kinda works, the specified deps are also used for generating
the pkg-config files and this leads to lots of Requires.private and Libs.private
entries which aren't really needed.

This removes the "deps" array and replaces it with a few smaller ones and
makes sure the public libraries only get passed the dependencies actually
needed.

Fixes #2441
2020-06-04 23:28:57 +04:30

54 lines
1.3 KiB
Meson

tests = [
'hb-shape-fuzzer.cc',
'hb-subset-fuzzer.cc',
'hb-set-fuzzer.cc',
'hb-draw-fuzzer.cc',
]
foreach file_name : tests
test_name = file_name.split('.')[0].underscorify()
exe = executable(test_name, [file_name, 'main.cc'],
cpp_args: cpp_args,
include_directories: [incconfig, incsrc],
link_with: [libharfbuzz, libharfbuzz_subset],
install: false,
)
set_variable('@0@_exe'.format(test_name.underscorify()), exe)
endforeach
env = environment()
env.set('srcdir', meson.current_source_dir())
env.set('HB_TEST_SUBSET_FUZZER_TIMEOUT', '36')
test('shape_fuzzer', find_program('run-shape-fuzzer-tests.py'),
args: [
hb_shape_fuzzer_exe,
],
depends: [hb_shape_fuzzer_exe, libharfbuzz, libharfbuzz_subset],
workdir: meson.current_build_dir() / '..' / '..',
env: env,
suite: ['fuzzing'],
)
test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'),
args: [
hb_subset_fuzzer_exe,
],
# as the tests are ran concurrently let's raise acceptable time here
# ideally better to break and let meson handles them in parallel
timeout: 300,
workdir: meson.current_build_dir() / '..' / '..',
env: env,
suite: ['fuzzing'],
)
test('draw_fuzzer', find_program('run-draw-fuzzer-tests.py'),
args: [
hb_draw_fuzzer_exe,
],
workdir: meson.current_build_dir() / '..' / '..',
env: env,
suite: ['fuzzing'],
)