7
8
# in the COPYING file in the root directory of this source tree).
8
9
# #############################################################################
10
lz4_root_dir = '../../../..'
11
programs_dir_inc = include_directories(join_paths(lz4_root_dir, 'programs'))
12
lib_dir_inc = include_directories(join_paths(lz4_root_dir, 'lib'))
14
# =============================================================================
16
# =============================================================================
18
TEST_FILES = join_paths(meson.current_source_dir(), lz4_root_dir, 'tests/COPYING')
22
# =============================================================================
24
# =============================================================================
26
fullbench_sources = [join_paths(lz4_root_dir, 'tests/fullbench.c')]
27
fullbench = executable('fullbench',
29
include_directories: programs_dir_inc,
30
dependencies: liblz4_dep,
33
fuzzer_sources = [join_paths(lz4_root_dir, 'tests/fuzzer.c')]
34
fuzzer = executable('fuzzer',
36
c_args: ['-D_DEFAULT_SOURCE', '-D_BSD_SOURCE'], # since glibc 2.19
37
include_directories: programs_dir_inc,
38
dependencies: liblz4_dep,
41
frametest_sources = [join_paths(lz4_root_dir, 'tests/frametest.c')]
42
frametest = executable('frametest',
44
include_directories: programs_dir_inc,
45
dependencies: liblz4_dep,
48
roundTripTest_sources = [join_paths(lz4_root_dir, 'tests/roundTripTest.c')]
49
roundTripTest = executable('roundTripTest',
50
roundTripTest_sources,
51
dependencies: [ liblz4_dep ],
54
datagen_sources = [join_paths(lz4_root_dir, 'tests/datagencli.c')]
55
datagen = executable('datagen',
57
objects: lz4.extract_objects(join_paths(lz4_root_dir, 'programs/datagen.c')),
58
include_directories: lz4_includes,
59
dependencies: [ liblz4_dep ],
62
checkFrame_sources = [join_paths(lz4_root_dir, 'tests/checkFrame.c')]
63
checkFrame = executable('checkFrame',
65
include_directories: programs_dir_inc,
66
dependencies: [ liblz4_dep ],
69
checkTag_sources = [join_paths(lz4_root_dir, 'tests/checkTag.c')]
70
checkTag = executable('checkTag',
72
include_directories: lib_dir_inc,
75
# =============================================================================
76
# Tests (Use "meson test --list" to list all tests)
77
# =============================================================================
79
# XXX: (Need TEST) These timeouts (in seconds) when running on a HDD should be
80
# at least six times bigger than on a SSD
82
test('test-fullbench',
84
args: ['--no-prompt', NB_LOOPS, TEST_FILES],
85
timeout: 420) # Should enough when running on HDD
90
test('test-frametest',
11
lz4_source_root = '../../../..'
15
'sources': files(lz4_source_root / 'tests/fullbench.c'),
16
'include_directories': include_directories(lz4_source_root / 'programs'),
19
'sources': files(lz4_source_root / 'tests/fuzzer.c'),
20
'include_directories': include_directories(lz4_source_root / 'programs'),
23
'sources': files(lz4_source_root / 'tests/frametest.c'),
24
'include_directories': include_directories(lz4_source_root / 'programs'),
27
'sources': files(lz4_source_root / 'tests/roundTripTest.c'),
30
'sources': files(lz4_source_root / 'tests/datagencli.c'),
31
'objects': lz4.extract_objects(lz4_source_root / 'programs/datagen.c'),
32
'include_directories': include_directories(lz4_source_root / 'programs'),
35
'sources': files(lz4_source_root / 'tests/checkFrame.c'),
36
'include_directories': include_directories(lz4_source_root / 'programs'),
39
'sources': files(lz4_source_root / 'tests/checkTag.c'),
43
foreach e, attrs : exes
47
objects: attrs.get('objects', []),
48
dependencies: [liblz4_internal_dep],
49
include_directories: attrs.get('include_directories', []),