Add --enable-sanitizers, fix make check with it

It's cleaner if this is an build option rather than being
kludged into the CI layer.

Notably we can't use `LD_PRELOAD` anymore with ASAN, so update
our tests to check for `ASAN_OPTIONS`.
This commit is contained in:
Colin Walters committed 2021-02-03 20:33:19 +00:00
1 parent 0485817978
commit d49f3291ad
3 files changed
+15 -12

No files matched your search

+3
View File
@@ -147,6 +147,9 @@ fi
# This is substituted by the build for installed tests
BUILT_WITH_ASAN=""
if test -n "${ASAN_OPTIONS:-}"; then
BUILT_WITH_ASAN=1
fi
if test -n "${OT_TESTS_VALGRIND:-}"; then
CMD_PREFIX="env G_SLICE=always-malloc OSTREE_SUPPRESS_SYNCFS=1 valgrind -q --error-exitcode=1 --leak-check=full --num-callers=30 --suppressions=${test_srcdir}/glib.supp --suppressions=${test_srcdir}/ostree.supp"