From: Zbigniew Jędrzejewski-Szmek Date: Sat, 2 Sep 2023 14:23:22 +0000 (+0300) Subject: meson: disallow fuzz test names above 60 characters X-Git-Tag: v255-rc1~579^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f933f752956b0b7069e8f5a708b650ff960e33d8;p=thirdparty%2Fsystemd.git meson: disallow fuzz test names above 60 characters The name is created as "systemd:fuzz / fuzz-_" 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. --- diff --git a/meson.build b/meson.build index efa90715116..807858c4a49 100644 --- a/meson.build +++ b/meson.build @@ -2326,17 +2326,27 @@ foreach dict : executables if want_tests != 'false' # 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, {}) 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, suite : 'fuzz', args : directive.full_path(), depends : directive) endforeach 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, suite : 'fuzz', args : file)