Vincent van Ravesteijn wrote:
> Ok, thanks for having a look at it.
I came up with a rather basic version. I did not test the new targets with
anything else than GNU make and GNU bash, but since they are mainly for our
own use I don't consider this a problem. The main goal (not having the tests
in make checks) works on any autotools supported system anyway.
OK to go in?
Georg
diff --git a/Makefile.am b/Makefile.am
index 6df1254..5c9e788 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,7 +46,7 @@ rpmdist: dist
rm lyx.png; exit $$saved_status
doxydoc:
- cd sourcedoc; make doxydoc
+ cd sourcedoc; $(MAKE) doxydoc
lfundoc:
development/tools/gen_lfuns.py src/LyXAction.cpp > lib/doc/LFUNs.lyx
@@ -54,8 +54,16 @@ lfundoc:
keystest:
development/keystest/lyx_make.sh
+alltests: check alltests-recursive
+
+alltests-recursive:
+ cd src; $(MAKE) alltests-recursive
+
+updatetests:
+ cd src; $(MAKE) updatetests
+
lgbtags:
etags --totals=yes --recurse=yes -o TAGS $(top_srcdir)/*
-.PHONY: doxydoc
+.PHONY: doxydoc alltests alltests-recursive updatetests
diff --git a/src/Makefile.am b/src/Makefile.am
index 17c7a25..024cf45 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -668,9 +668,19 @@ endif
EXTRA_DIST += \
tests/test_layout
+alltests: check alltests-recursive
-TESTS = \
- tests/test_layout
+alltests-recursive: check_layout
+ @srcdir=$(srcdir) $(srcdir)/tests/test_layout; \
+ if test $$? -eq 0; then \
+ echo -e "====================\nlayout tests passed.\n===================="; \
+ else \
+ echo -e "====================\nlayout tests failed.\n===================="; \
+ fi
+ cd tex2lyx; $(MAKE) alltests-recursive
+
+updatetests:
+ cd tex2lyx; $(MAKE) updatetests
check_PROGRAMS = \
check_layout
@@ -699,3 +709,4 @@ check_layout_SOURCES = \
support/tests/boost.cpp \
support/tests/dummy_functions.cpp
+.PHONY: alltests alltests-recursive updatetests
diff --git a/src/tex2lyx/Makefile.am b/src/tex2lyx/Makefile.am
index 9ebbdc0..2cbe658 100644
--- a/src/tex2lyx/Makefile.am
+++ b/src/tex2lyx/Makefile.am
@@ -53,7 +53,16 @@ TEST_RESULTS = \
test/verbatim.lyx.lyx \
test/XeTeX-polyglossia.lyx.lyx
-TESTS = test/runtests.py
+alltests: check alltests-recursive
+
+alltests-recursive: tex2lyx
+ @$(PYTHON) "$(srcdir)/test/runtests.py"; \
+ if test $$? -eq 0; then \
+ echo -e "=====================\ntex2lyx tests passed.\n====================="; \
+ else \
+ echo -e "=====================\ntex2lyx tests failed.\n====================="; \
+ fi
+
updatetests: tex2lyx
$(PYTHON) "$(srcdir)/test/runtests.py" ./tex2lyx "$(top_srcdir)/lib/scripts" "$(srcdir)/test"
@@ -107,3 +116,5 @@ tex2lyx_LDADD = \
if INSTALL_MACOSX
tex2lyx_LDFLAGS = -framework AppKit
endif
+
+.PHONY: alltests alltests-recursive updatetests