tests: Tweak installed tests to deal with ASAN
We need to disable readdir-rand there too. Closes: #622 Approved by: jlebon
This commit is contained in:
parent
47b4dd1b38
commit
359ea9b58f
|
|
@ -116,7 +116,6 @@ endif
|
|||
|
||||
dist_installed_test_data = tests/archive-test.sh \
|
||||
tests/pull-test.sh \
|
||||
tests/libtest.sh \
|
||||
tests/admin-test.sh \
|
||||
tests/basic-test.sh \
|
||||
tests/test-basic-user.sh \
|
||||
|
|
@ -125,6 +124,8 @@ dist_installed_test_data = tests/archive-test.sh \
|
|||
tests/pre-endian-deltas-repo-little.tar.xz \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DIST += tests/libtest.sh
|
||||
|
||||
dist_test_extra_scripts = tests/bootloader-entries-crosscheck.py \
|
||||
tests/ostree-grub-generator
|
||||
|
||||
|
|
@ -286,4 +287,12 @@ install-test-data-file-path-hack:
|
|||
fi
|
||||
ln -s . $(DESTDIR)$(installed_testdir)/tests
|
||||
INSTALL_DATA_HOOKS += install-test-data-file-path-hack
|
||||
|
||||
install-libtest:
|
||||
if BUILDOPT_ASAN
|
||||
sed -e 's,^BUILT_WITH_ASAN=.*,BUILT_WITH_ASAN=1,' < $(srcdir)/tests/libtest.sh > $(DESTDIR)$(installed_testdir)/tests/libtest.sh
|
||||
else
|
||||
install -m 0644 $(srcdir)/tests/libtest.sh $(DESTDIR)$(installed_testdir)/tests/libtest.sh
|
||||
endif
|
||||
INSTALL_DATA_HOOKS += install-libtest
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -86,13 +86,16 @@ if test -n "${OT_TESTS_DEBUG:-}"; then
|
|||
set -x
|
||||
fi
|
||||
|
||||
# This is substituted by the build for installed tests
|
||||
BUILT_WITH_ASAN=""
|
||||
|
||||
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"
|
||||
else
|
||||
# In some cases the LD_PRELOAD may cause obscure problems,
|
||||
# e.g. right now it breaks for me with -fsanitize=address, so
|
||||
# let's allow users to skip it.
|
||||
if test -z "${OT_SKIP_READDIR_RAND:-}"; then
|
||||
if test -z "${OT_SKIP_READDIR_RAND:-}" && test -z "${BUILT_WITH_ASAN:-}"; then
|
||||
CMD_PREFIX="env LD_PRELOAD=${test_builddir}/libreaddir-rand.so"
|
||||
else
|
||||
CMD_PREFIX=""
|
||||
|
|
|
|||
Loading…
Reference in New Issue