Imported Upstream version 2.6.7
[platform/upstream/harfbuzz.git] / test / fuzzing / meson.build
1 tests = [
2   'hb-shape-fuzzer.cc',
3   'hb-subset-fuzzer.cc',
4   'hb-set-fuzzer.cc',
5   'hb-draw-fuzzer.cc',
6 ]
7
8 foreach file_name : tests
9   test_name = file_name.split('.')[0].underscorify()
10
11   exe = executable(test_name, [file_name, 'main.cc'],
12     cpp_args: cpp_args,
13     include_directories: [incconfig, incsrc],
14     dependencies: deps,
15     link_with: [libharfbuzz, libharfbuzz_subset],
16     install: false,
17   )
18   set_variable('@0@_exe'.format(test_name.underscorify()), exe)
19 endforeach
20
21 env = environment()
22 env.set('srcdir', meson.current_source_dir())
23 env.set('HB_TEST_SUBSET_FUZZER_TIMEOUT', '36')
24
25 test('shape_fuzzer', find_program('run-shape-fuzzer-tests.py'),
26   args: [
27     hb_shape_fuzzer_exe,
28   ],
29   depends: [hb_shape_fuzzer_exe, libharfbuzz, libharfbuzz_subset],
30   workdir: meson.current_build_dir() / '..' / '..',
31   env: env,
32   suite: ['fuzzing'],
33 )
34
35 test('subset_fuzzer', find_program('run-subset-fuzzer-tests.py'),
36   args: [
37     hb_subset_fuzzer_exe,
38   ],
39   # as the tests are ran concurrently let's raise acceptable time here
40   # ideally better to break and let meson handles them in parallel
41   timeout: 300,
42   workdir: meson.current_build_dir() / '..' / '..',
43   env: env,
44   suite: ['fuzzing'],
45 )
46
47 test('draw_fuzzer', find_program('run-draw-fuzzer-tests.py'),
48   args: [
49     hb_draw_fuzzer_exe,
50   ],
51   workdir: meson.current_build_dir() / '..' / '..',
52   env: env,
53   suite: ['fuzzing'],
54 )