]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Add convenience `recheck' target to our toplevel Makefile.am.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 17 Oct 2009 13:18:27 +0000 (15:18 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sat, 17 Oct 2009 13:19:29 +0000 (15:19 +0200)
* 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>
ChangeLog
Makefile.am
Makefile.in
tests/README

index 5313f4ed1af2f2b145f03dd81d9cafb8c618ee91..23cba8ed6afe9c97df21c1161106e77a924b8d31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
index d082a3ae9372b504eeebd8d486ebc84d15cfd5ce..66d8315cb054c695a0c87da083186b6dd0bb3203 100644 (file)
@@ -94,6 +94,23 @@ automake aclocal: Makefile
 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
index c522390217875905bec6bb07d93b3fd60b798f7d..f06e655d2daee5de4a98f7a7cf4bb386d6d28e77 100644 (file)
@@ -245,6 +245,7 @@ do_subst = sed \
   -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.
@@ -843,6 +844,20 @@ automake aclocal: Makefile
 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
index 4068ad6fccdaf4eea7dc3eb4c6830cd3ae640ff8..d494b103d9547423acf8dd280e03e884cf4cc910 100644 (file)
@@ -5,15 +5,33 @@ User interface
 ==============
 
 
-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
 --------------