[repacker] only build repacker fuzzer when experimental api is enabled.

This commit is contained in:
Garret Rieger 2022-12-01 23:57:30 +00:00
parent de5a621322
commit 16f61a1c87
1 changed files with 21 additions and 14 deletions

View File

@ -1,11 +1,14 @@
tests = [ tests = [
'hb-shape-fuzzer.cc', 'hb-shape-fuzzer.cc',
'hb-subset-fuzzer.cc', 'hb-subset-fuzzer.cc',
'hb-repacker-fuzzer.cc',
'hb-set-fuzzer.cc', 'hb-set-fuzzer.cc',
'hb-draw-fuzzer.cc', 'hb-draw-fuzzer.cc',
] ]
if get_option('experimental_api')
tests += 'hb-repacker-fuzzer.cc'
endif
foreach file_name : tests foreach file_name : tests
test_name = file_name.split('.')[0] test_name = file_name.split('.')[0]
@ -20,8 +23,10 @@ foreach file_name : tests
extra_cpp_args += '-DHB_IS_IN_FUZZER' extra_cpp_args += '-DHB_IS_IN_FUZZER'
endif endif
# TODO tie this to the experimental api setting. if get_option('experimental_api')
extra_cpp_args += '-DHB_EXPERIMENTAL_API' extra_cpp_args += '-DHB_EXPERIMENTAL_API'
endif
exe = executable(test_name, sources, exe = executable(test_name, sources,
cpp_args: cpp_args + extra_cpp_args, cpp_args: cpp_args + extra_cpp_args,
include_directories: [incconfig, incsrc], include_directories: [incconfig, incsrc],
@ -58,17 +63,19 @@ test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'),
suite: ['fuzzing', 'slow'], suite: ['fuzzing', 'slow'],
) )
test('repacker_fuzzer', find_program('run-repacker-fuzzer-tests.py'), if get_option('experimental_api')
args: [ test('repacker_fuzzer', find_program('run-repacker-fuzzer-tests.py'),
hb_repacker_fuzzer_exe, args: [
], hb_repacker_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 # as the tests are ran concurrently let's raise acceptable time here
timeout: 300, # ideally better to break and let meson handles them in parallel
workdir: meson.current_build_dir() / '..' / '..', timeout: 300,
env: env, workdir: meson.current_build_dir() / '..' / '..',
suite: ['fuzzing', 'slow'], env: env,
) suite: ['fuzzing', 'slow'],
)
endif
test('draw_fuzzer', find_program('run-draw-fuzzer-tests.py'), test('draw_fuzzer', find_program('run-draw-fuzzer-tests.py'),
args: [ args: [