mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test: enable fuzz regression tests by default
This ensures that the fuzz test code is also built by default. It also increases the test coverage a bit. Compiling the tests *with* sanitizers is painfully slow, so this is not enabled. But just compiling them sauté is hardly noticable. Running the tests increases the test count and runtime: 622 tests, 26 s to 922 tests, 35 s I think this is acceptable.
This commit is contained in:
parent
d99c2df2df
commit
f78ad5f046
20
meson.build
20
meson.build
@ -3440,7 +3440,7 @@ foreach tuple : fuzzers
|
||||
|
||||
name = sources[0].split('/')[-1].split('.')[0]
|
||||
|
||||
fuzzer_exes += executable(
|
||||
exe = executable(
|
||||
name,
|
||||
sources,
|
||||
include_directories : [incs, include_directories('src/fuzz')],
|
||||
@ -3449,7 +3449,23 @@ foreach tuple : fuzzers
|
||||
c_args : defs + test_cflags,
|
||||
link_args: link_args,
|
||||
install : false,
|
||||
build_by_default : fuzz_tests or fuzzer_build)
|
||||
build_by_default : fuzzer_build)
|
||||
fuzzer_exes += exe
|
||||
|
||||
if want_tests != 'false'
|
||||
# Run the fuzz regression tests without any sanitizers enabled.
|
||||
# Additional invocations with sanitizers may be added below.
|
||||
foreach p : fuzz_regression_tests
|
||||
b = p.split('/')[-2]
|
||||
c = p.split('/')[-1]
|
||||
|
||||
if b == name
|
||||
test('@0@_@1@'.format(b, c),
|
||||
exe,
|
||||
args : [join_paths(project_source_root, p)])
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
endforeach
|
||||
|
||||
run_target(
|
||||
|
@ -393,7 +393,7 @@ option('tests', type : 'combo', choices : ['true', 'unsafe', 'false'],
|
||||
option('slow-tests', type : 'boolean', value : 'false',
|
||||
description : 'run the slow tests by default')
|
||||
option('fuzz-tests', type : 'boolean', value : 'false',
|
||||
description : 'run the fuzzer regression tests by default')
|
||||
description : 'run the fuzzer regression tests by default (with sanitizers)')
|
||||
option('install-tests', type : 'boolean', value : 'false',
|
||||
description : 'install test executables')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user