[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] Add convenience `recheck' target to our toplevel Makefile.am
From: |
Ralf Wildenhues |
Subject: |
[PATCH 1/2] Add convenience `recheck' target to our toplevel Makefile.am. |
Date: |
Sun, 18 Oct 2009 11:26:32 +0200 |
User-agent: |
Mutt/1.5.20 (2009-08-09) |
I've been meaning to do this for a while, since recheck is quite
convenient. I still can't find a good rationale/way to add it to
user Makefile.in files (it's useless without parallel-tests, but
when we process toplevel Makefile.am, we cannot know whether a
subdir uses it).
Anyway, this is useful for Automake itself, and documenting a few
more tricks in tests/README can only be good, too.
Cheers,
Ralf
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.
diff --git a/Makefile.am b/Makefile.am
index d082a3a..66d8315 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/tests/README b/tests/README
index 4068ad6..d494b10 100644
--- a/tests/README
+++ b/tests/README
@@ -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
--------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 1/2] Add convenience `recheck' target to our toplevel Makefile.am.,
Ralf Wildenhues <=