Compare commits

...

3 Commits

Author SHA1 Message Date
Evgeny Vereshchagin 3c60fb077f
Merge pull request #15886 from mrc0mmand/travis-enable-fuzz-tests
travis: enable fuzzer regression tests under sanitizers
2020-05-23 19:21:44 +03:00
Frantisek Sumsal 87666b31f9 meson: pass the optimization level to the fuzzer build 2020-05-23 14:19:25 +02:00
Frantisek Sumsal e9158b254c travis: enable fuzzer regression tests under sanitizers 2020-05-22 19:12:59 +02:00
2 changed files with 6 additions and 2 deletions

View File

@ -7,7 +7,8 @@ sanitize_address_undefined = custom_target(
project_source_root,
'@OUTPUT@',
'fuzzers',
'-Db_lundef=false -Db_sanitize=address,undefined',
'-Db_lundef=false -Db_sanitize=address,undefined ' +
'--optimization=@0@'.format(get_option('optimization')),
' '.join(cc.cmd_array()),
cxx_cmd])

View File

@ -65,7 +65,10 @@ for phase in "${PHASES[@]}"; do
RUN_ASAN|RUN_CLANG_ASAN)
if [[ "$phase" = "RUN_CLANG_ASAN" ]]; then
ENV_VARS="-e CC=clang -e CXX=clang++"
MESON_ARGS="-Db_lundef=false" # See https://github.com/mesonbuild/meson/issues/764
# Build fuzzer regression tests only with clang (for now),
# see: https://github.com/systemd/systemd/pull/15886#issuecomment-632689604
# -Db_lundef=false: See https://github.com/mesonbuild/meson/issues/764
MESON_ARGS="-Db_lundef=false -Dfuzz-tests=true --optimization=1"
fi
docker exec $ENV_VARS -it $CONT_NAME meson --werror -Dtests=unsafe -Db_sanitize=address,undefined -Dsplit-usr=true $MESON_ARGS build
$DOCKER_EXEC ninja -v -C build