diff options
author | Reuben Thomas <rrt@sc3d.org> | 2016-12-31 21:19:32 +0000 |
---|---|---|
committer | Reuben Thomas <rrt@sc3d.org> | 2017-01-10 21:41:48 +0000 |
commit | b00122aa6f7b17db8d21a84dd888d30f11ea3248 (patch) | |
tree | 09f53395e99ab5d450fd0a6224c53ae031ec9be6 /tests | |
parent | 19ff32050df99bc44a5f983854fdbaafad4adf1b (diff) | |
download | enchant-b00122aa6f7b17db8d21a84dd888d30f11ea3248.tar.gz |
Run tests with 'make check'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.gitignore | 7 | ||||
-rw-r--r-- | tests/Makefile.am | 44 | ||||
-rw-r--r-- | tests/enchant.test.c (renamed from tests/test-enchant.c) | 0 | ||||
-rw-r--r-- | tests/enchantxx.test.cpp (renamed from tests/test-enchantxx.cpp) | 0 | ||||
-rw-r--r-- | tests/test.pwl.orig (renamed from tests/test.pwl) | 0 |
5 files changed, 32 insertions, 19 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index fa19b7c..b47de11 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,5 +1,8 @@ +/*.trs +/*.log /enchant /enchant-lsmod /ispell -/test-enchant -/test-enchantxx +/enchant.test +/enchantxx.test +/test.pwl diff --git a/tests/Makefile.am b/tests/Makefile.am index 2c84b62..ddff1a2 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,35 +1,45 @@ AM_CPPFLAGS=-I$(top_srcdir)/src $(ENCHANT_CFLAGS) -EXTRA_DIST=test.pwl ispell.in +# Note: each directory is given with and without $(ENCHANT_LT_OBJDIR) to +# work with static builds and on systems that do not have static compilation +# and hence don't use LT_OBJDIR. +# FIXME: Following line is ugly (but inserting backslashes stops it +# working), and not portable to Windows (need semicolons instead of colons) +AM_TESTS_ENVIRONMENT=\ + ENCHANT_MODULE_PATH=$(top_builddir)/src/applespell/$(ENCHANT_LT_OBJDIR):$(top_builddir)/src/applespell:$(top_builddir)/src/aspell/$(ENCHANT_LT_OBJDIR):$(top_builddir)/src/aspell:$(top_builddir)/src/hspell/$(ENCHANT_LT_OBJDIR):$(top_builddir)/src/hspell:$(top_builddir)/src/ispell/$(ENCHANT_LT_OBJDIR):$(top_builddir)/src/ispell:$(top_builddir)/src/myspell/$(ENCHANT_LT_OBJDIR):$(top_builddir)/src/myspell:$(top_builddir)/src/uspell/$(ENCHANT_LT_OBJDIR):$(top_builddir)/src/uspell:$(top_builddir)/src/voikko/$(ENCHANT_LT_OBJDIR):$(top_builddir)/src/voikko:$(top_builddir)/src/zemberek/$(ENCHANT_LT_OBJDIR):$(top_builddir)/src/zemberek; \ + export ENCHANT_MODULE_PATH; \ + rm -f test.pwl; \ + cp $(srcdir)/test.pwl.orig $(builddir)/test.pwl; \ + chmod +w $(builddir)/test.pwl; -DEPS= $(top_builddir)/src/libenchant.la -ldadd= $(top_builddir)/src/libenchant.la $(ENCHANT_LIBS) +DISTCLEANFILES = test.pwl + +EXTRA_DIST=test.pwl.orig ispell.in + +ldadd= $(top_builddir)/src/libenchant.la $(ENCHANT_LIBS) if WITH_CXX -cxx_progs = test-enchantxx +cxx_progs = enchantxx.test else cxx_progs = endif -noinst_PROGRAMS = test-enchant $(cxx_progs) +noinst_PROGRAMS = enchant.test $(cxx_progs) bin_PROGRAMS= enchant-lsmod enchant -test_enchant_SOURCES = test-enchant.c -test_enchant_LDFLAGS = -test_enchant_DEPENDENCIES = $(DEPS) -test_enchant_LDADD = $(ldadd) +enchant_test_SOURCES = enchant.test.c +enchant_test_LDADD = $(ldadd) enchant_SOURCES = enchant-ispell.c -enchant_LDFLAGS = -enchant_DEPENDENCIES = $(DEPS) enchant_LDADD = $(ldadd) -test_enchantxx_SOURCES = test-enchantxx.cpp -test_enchantxx_LDFLAGS = -test_enchantxx_DEPENDENCIES = $(DEPS) -test_enchantxx_LDADD = $(ldadd) +enchantxx_test_SOURCES = enchantxx.test.cpp +enchantxx_test_LDADD = $(ldadd) enchant_lsmod_SOURCES = enchant-lsmod.c -enchant_lsmod_LDFLAGS = -enchant_lsmod_DEPENDENCIES = $(DEPS) enchant_lsmod_LDADD = $(ldadd) + +TESTS = $(noinst_PROGRAMS) + +# Enforce serial running of tests, so they don't contend for test.pwl +enchantxx.log: enchant.log diff --git a/tests/test-enchant.c b/tests/enchant.test.c index 7217b63..7217b63 100644 --- a/tests/test-enchant.c +++ b/tests/enchant.test.c diff --git a/tests/test-enchantxx.cpp b/tests/enchantxx.test.cpp index bb9a153..bb9a153 100644 --- a/tests/test-enchantxx.cpp +++ b/tests/enchantxx.test.cpp diff --git a/tests/test.pwl b/tests/test.pwl.orig index c6089a7..c6089a7 100644 --- a/tests/test.pwl +++ b/tests/test.pwl.orig |