* Makefile.am (recheck): New convenience target.
* tests/README: Give examples for running only failed or
outdated or otherwise selected tests.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-10-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Add convenience `recheck' target to our toplevel Makefile.am.
+ * Makefile.am (recheck): New convenience target.
+ * tests/README: Give examples for running only failed or
+ outdated or otherwise selected tests.
+
Sync auxiliary files from upstream.
* INSTALL, lib/INSTALL, lib/config.guess, lib/config.sub,
lib/texinfo.tex: Sync from upstream.
INSTALL: lib/INSTALL
cp $(srcdir)/lib/INSTALL $@
+## recheck: convenience proxy target for the test suites.
+TEST_SUBDIRS = lib/Automake/tests tests
+
+.PHONY: recheck
+recheck:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ for subdir in $(TEST_SUBDIRS); do \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) || eval $$failcom; \
+ done; \
+ test -z "$$fail"
+
################################################################
##
## Everything past here is useful to the maintainer, but probably not
-e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \
-e 's,[@]datadir[@],$(datadir),g'
+TEST_SUBDIRS = lib/Automake/tests tests
# Some simple checks, and then ordinary check. These are only really
# guaranteed to work on my machine.
INSTALL: lib/INSTALL
cp $(srcdir)/lib/INSTALL $@
+.PHONY: recheck
+recheck:
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ for subdir in $(TEST_SUBDIRS); do \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) || eval $$failcom; \
+ done; \
+ test -z "$$fail"
+
################################################################
# Ensure tests are world-executable
==============
-Running all tests
+Running the tests
-----------------
- make check
+ To run all tests:
+
+ make -k check
You can use `-jN' for faster completion (it even helps on a
uniprocessor system, due to unavoidable sleep delays, as
noted below).
+ To rerun only failed tests:
+
+ make -k recheck
+
+ To run only tests that are newer than their last results:
+
+ make -k check RECHECK_LOGS=
+
+ To run only selected tests:
+
+ make -k check TESTS="foo.test bar.test"
+
+ For non-GNU make, you might have to use this instead:
+
+ env TESTS="foo.test bar.test" make -e -k check
+
Interpretation
--------------