summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2019-09-11 14:21:24 +0100
committerReuben Thomas <rrt@sc3d.org>2019-09-11 14:21:24 +0100
commit5c7de85b55ef82645c0c3fea3c1ee5e0a7abf04c (patch)
treec2bd214f116290afe5dfdd00022ac85b0c5d8748 /tests
parent8465d3391f35f88a4a528588bd87604b475f5365 (diff)
downloadenchant-5c7de85b55ef82645c0c3fea3c1ee5e0a7abf04c.tar.gz
Tests: add support for building with ASAN, including leak suppressions
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/asan-suppressions.txt5
-rw-r--r--tests/enchant_providers/Makefile.am3
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3f3f333..3c3bb33 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,7 +19,8 @@ AM_TESTS_ENVIRONMENT = \
$(MAKE) libenchant-copy; \
cp $(srcdir)/test.pwl.orig $(builddir)/test.pwl; \
cp $(builddir)/@objdir@/*@shlibext@ .; \
- chmod +w $(builddir)/test.pwl;
+ chmod +w $(builddir)/test.pwl; \
+ export LSAN_OPTIONS=suppressions=$(srcdir)/asan-suppressions.txt;
DISTCLEANFILES = test.pwl *@shlibext@
diff --git a/tests/asan-suppressions.txt b/tests/asan-suppressions.txt
new file mode 100644
index 0000000..89dc7cd
--- /dev/null
+++ b/tests/asan-suppressions.txt
@@ -0,0 +1,5 @@
+# glibc
+leak:getdelim
+
+# gnulib
+leak:set_this_relocation_prefix
diff --git a/tests/enchant_providers/Makefile.am b/tests/enchant_providers/Makefile.am
index 2678f94..083a17e 100644
--- a/tests/enchant_providers/Makefile.am
+++ b/tests/enchant_providers/Makefile.am
@@ -16,7 +16,8 @@ AM_TESTS_ENVIRONMENT = \
if test -n "$(VALGRIND)"; then export VALGRIND='$(VALGRIND) --suppressions=$(top_srcdir)/lib/relocatable.valgrind'; fi; \
export LIBTOOL=$(top_builddir)/libtool; \
$(MAKE) libenchant-copy; \
- cp $(top_builddir)/providers/@objdir@/*@shlibext@ $(builddir) || :;
+ cp $(top_builddir)/providers/@objdir@/*@shlibext@ $(builddir) || :; \
+ export LSAN_OPTIONS=suppressions=$(top_srcdir)/tests/asan-suppressions.txt;
DISTCLEANFILES = *@shlibext@