2018-05-16 23:28:53 +00:00
|
|
|
tests = [
|
2020-03-24 15:38:40 +00:00
|
|
|
'hb-shape-fuzzer.cc',
|
|
|
|
'hb-subset-fuzzer.cc',
|
|
|
|
'hb-set-fuzzer.cc',
|
|
|
|
'hb-draw-fuzzer.cc',
|
2018-05-16 23:28:53 +00:00
|
|
|
]
|
|
|
|
|
2020-03-24 15:38:40 +00:00
|
|
|
foreach file_name : tests
|
|
|
|
test_name = file_name.split('.')[0].underscorify()
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 15:38:40 +00:00
|
|
|
exe = executable(test_name, [file_name, 'main.cc'],
|
2018-05-16 23:28:53 +00:00
|
|
|
cpp_args: cpp_args,
|
2018-11-14 20:19:36 +00:00
|
|
|
include_directories: [incconfig, incsrc],
|
2018-05-16 23:28:53 +00:00
|
|
|
dependencies: deps,
|
|
|
|
link_with: [libharfbuzz, libharfbuzz_subset],
|
2020-03-24 18:05:41 +00:00
|
|
|
install: false,
|
2018-05-16 23:28:53 +00:00
|
|
|
)
|
2018-05-17 21:52:36 +00:00
|
|
|
set_variable('@0@_exe'.format(test_name.underscorify()), exe)
|
2018-05-16 23:28:53 +00:00
|
|
|
endforeach
|
|
|
|
|
2018-05-17 21:52:36 +00:00
|
|
|
env = environment()
|
|
|
|
env.set('srcdir', meson.current_source_dir())
|
2020-05-21 10:15:41 +00:00
|
|
|
env.set('HB_TEST_SUBSET_FUZZER_TIMEOUT', '36')
|
2018-05-17 21:52:36 +00:00
|
|
|
|
2020-03-24 15:11:53 +00:00
|
|
|
test('shape_fuzzer', find_program('run-shape-fuzzer-tests.py'),
|
2018-05-16 23:28:53 +00:00
|
|
|
args: [
|
2018-05-17 21:52:36 +00:00
|
|
|
hb_shape_fuzzer_exe,
|
2018-05-16 23:28:53 +00:00
|
|
|
],
|
2018-05-17 23:25:22 +00:00
|
|
|
depends: [hb_shape_fuzzer_exe, libharfbuzz, libharfbuzz_subset],
|
2020-05-21 12:31:04 +00:00
|
|
|
workdir: meson.current_build_dir() / '..' / '..',
|
2018-05-17 21:52:36 +00:00
|
|
|
env: env)
|
2018-05-16 23:28:53 +00:00
|
|
|
|
2020-03-24 15:11:53 +00:00
|
|
|
test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'),
|
2018-05-16 23:28:53 +00:00
|
|
|
args: [
|
2018-05-17 21:52:36 +00:00
|
|
|
hb_subset_fuzzer_exe,
|
2018-05-16 23:28:53 +00:00
|
|
|
],
|
2020-03-24 15:09:42 +00:00
|
|
|
# as the tests are ran concurrently let's raise acceptable time here
|
|
|
|
# ideally better to break and let meson handles them in parallel
|
2020-05-21 09:53:36 +00:00
|
|
|
timeout: 300,
|
2020-05-21 12:31:04 +00:00
|
|
|
workdir: meson.current_build_dir() / '..' / '..',
|
2018-05-17 21:52:36 +00:00
|
|
|
env: env)
|
2020-03-24 15:38:40 +00:00
|
|
|
|
|
|
|
test('draw_fuzzer', find_program('run-draw-fuzzer-tests.py'),
|
|
|
|
args: [
|
|
|
|
hb_draw_fuzzer_exe,
|
|
|
|
],
|
2020-05-21 12:31:04 +00:00
|
|
|
workdir: meson.current_build_dir() / '..' / '..',
|
2020-03-24 15:38:40 +00:00
|
|
|
env: env)
|