mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
meson: disallow fuzz test names above 60 characters
The name is created as "systemd:fuzz / fuzz-<fuzzer_name>_<sample_name>" and if that's very long, output gets wrapped when 'meson test' is run, and this is rather annoying. Disallow filenames above 45 characters, which leads a 60 char names.
This commit is contained in:
parent
37edb704f9
commit
f933f75295
16
meson.build
16
meson.build
|
@ -2326,17 +2326,27 @@ foreach dict : executables
|
||||||
|
|
||||||
if want_tests != 'false'
|
if want_tests != 'false'
|
||||||
# Run the fuzz regression tests without any sanitizers enabled.
|
# Run the fuzz regression tests without any sanitizers enabled.
|
||||||
# Additional invocations with sanitizers may be added below.
|
# Additional invocations with sanitizers may get added below.
|
||||||
fuzz_ins = fuzz_regression_tests.get(name, {})
|
fuzz_ins = fuzz_regression_tests.get(name, {})
|
||||||
foreach directive : fuzz_ins.get('directives', [])
|
foreach directive : fuzz_ins.get('directives', [])
|
||||||
test('@0@_@1@'.format(name, fs.name(directive.full_path())),
|
tt = '@0@_@1@'.format(name, fs.name(directive.full_path()))
|
||||||
|
if tt.substring(45) != ''
|
||||||
|
error('Directive sample name is too long:', directive.full_path())
|
||||||
|
endif
|
||||||
|
|
||||||
|
test(tt,
|
||||||
exe,
|
exe,
|
||||||
suite : 'fuzz',
|
suite : 'fuzz',
|
||||||
args : directive.full_path(),
|
args : directive.full_path(),
|
||||||
depends : directive)
|
depends : directive)
|
||||||
endforeach
|
endforeach
|
||||||
foreach file : fuzz_ins.get('files', [])
|
foreach file : fuzz_ins.get('files', [])
|
||||||
test('@0@_@1@'.format(name, fs.name(file)),
|
tt = '@0@_@1@'.format(name, fs.name(file))
|
||||||
|
if tt.substring(45) != ''
|
||||||
|
error('Fuzz sample name is too long:', fs.name(file))
|
||||||
|
endif
|
||||||
|
|
||||||
|
test(tt,
|
||||||
exe,
|
exe,
|
||||||
suite : 'fuzz',
|
suite : 'fuzz',
|
||||||
args : file)
|
args : file)
|
||||||
|
|
Loading…
Reference in a new issue