diff options
author | Reuben Thomas <rrt@sc3d.org> | 2017-04-12 14:35:25 +0100 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2017-04-15 13:43:56 +0100 |
commit | 8049c870d19f436e3fda927886e1fb2287081bfe (patch) | |
tree | 7d12d20dd5569548985869e77547b68e456ae8a7 /tests | |
parent | c867eba2423fd1d89c57cc2ca3324bf444650ef3 (diff) | |
download | enchant-8049c870d19f436e3fda927886e1fb2287081bfe.tar.gz |
Use valgrind-tests module to run tests under Valgrind
Had to patch valgrind-tests.m4 to work around false positive in bash.
See https://lists.gnu.org/archive/html/bug-bash/2017-04/msg00038.html
Also add a suppressions file for relocatable.c.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.gitignore | 6 | ||||
-rw-r--r-- | tests/Makefile.am | 5 | ||||
-rwxr-xr-x | tests/run-test | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index f1ba630..4339167 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -8,3 +8,9 @@ libenchant_*.so libenchant_*.dylib *enchant*.dll +/_Noreturn.h +/arg-nonnull.h +/c++defs.h +/dummy.c +/unused-parameter.h +/warn-on-use.h diff --git a/tests/Makefile.am b/tests/Makefile.am index 723dc2a..101e23f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,6 +7,8 @@ ENCHANT_CONFIG_DIR = config # FIXME: Duplication of LIBENCHANT_COPY actions AM_TESTS_ENVIRONMENT = \ export ENCHANT_CONFIG_DIR=$(ENCHANT_CONFIG_DIR); \ + if test -n "$(VALGRIND)"; then export VALGRIND='$(VALGRIND) --suppressions=$(top_srcdir)/build-aux/relocatable.supp'; fi; \ + export LIBTOOL=$(top_builddir)/libtool; \ rm -rf test.pwl $(libdir_subdir); \ mkdir -p $(libdir_subdir)/enchant; \ cp -r $(top_builddir)/src/@objdir@ $(libdir_subdir)/; \ @@ -23,7 +25,7 @@ DISTCLEANFILES = test.pwl *@shlibext@ distclean-local: rm -rf $(libdir_subdir) $(ENCHANT_CONFIG_DIR) -EXTRA_DIST = test.pwl.orig mock_provider.h +EXTRA_DIST = test.pwl.orig mock_provider.h run-test LIBENCHANT_COPY = $(builddir)/$(libdir_subdir)/libenchant.la $(LIBENCHANT_COPY): $(top_builddir)/src/libenchant.la @@ -68,6 +70,7 @@ libenchant_null_describe_la_LDFLAGS = $(libenchant_mock_provider_la_LDFLAGS) libenchant_null_describe_la_SOURCES = $(libenchant_mock_provider_la_SOURCES) check_PROGRAMS = enchant.test enchantxx.test main +LOG_COMPILER = $(srcdir)/run-test enchant_test_SOURCES = enchant.test.c enchantxx_test_SOURCES = enchantxx.test.cpp diff --git a/tests/run-test b/tests/run-test new file mode 100755 index 0000000..2e26f3f --- /dev/null +++ b/tests/run-test @@ -0,0 +1,3 @@ +#!/bin/sh +# Run the given binary via a libtool wrapper script +$LIBTOOL --mode=execute $VALGRIND "$@" |