[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-ng] [PATCH 09/10] [ng] parallel-tests: fix confusing function
From: |
Stefano Lattarini |
Subject: |
[Automake-ng] [PATCH 09/10] [ng] parallel-tests: fix confusing function names in Makefile recipes |
Date: |
Mon, 23 Apr 2012 11:57:27 +0200 |
* lib/am/check.am: Rename shell function 'result_count' to
'display_result_count', to avoid confusion with the recently
added 'count_result' function. Throw in a couple of cosmetic
improvements since we are at it.
Signed-off-by: Stefano Lattarini <address@hidden>
---
lib/am/check.am | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/lib/am/check.am b/lib/am/check.am
index 1961105..9c20892 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -160,14 +160,15 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) $(am__TEST_RESULTS)
## When writing the test summary to the console, we want to color a line
## reporting the count of some result *only* if at least one test
## experienced such a result. This function is handy in this regard.
- result_count () \
+ display_result_count () \
{ \
if test x"$$1" = x"--maybe-color"; then \
maybe_colorize=yes; \
elif test x"$$1" = x"--no-color"; then \
maybe_colorize=no; \
else \
- echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ echo "$@: invalid 'display_result_count' usage" >&2; \
+ exit 4; \
fi; \
shift; \
desc=$$1 count=$$2; \
@@ -183,13 +184,14 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) $(am__TEST_RESULTS)
## and a possibly-colorized one for console output.
create_testsuite_report () \
{ \
- result_count $$1 "TOTAL:" $$all "$$brg"; \
- result_count $$1 "PASS: " $$pass "$$grn"; \
- result_count $$1 "SKIP: " $$skip "$$blu"; \
- result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
- result_count $$1 "FAIL: " $$fail "$$red"; \
- result_count $$1 "XPASS:" $$xpass "$$red"; \
- result_count $$1 "ERROR:" $$error "$$mgn"; \
+ opts=$$*; \
+ display_result_count $$opts "TOTAL:" $$all "$$brg"; \
+ display_result_count $$opts "PASS: " $$pass "$$grn"; \
+ display_result_count $$opts "SKIP: " $$skip "$$blu"; \
+ display_result_count $$opts "XFAIL:" $$xfail "$$lgn"; \
+ display_result_count $$opts "FAIL: " $$fail "$$red"; \
+ display_result_count $$opts "XPASS:" $$xpass "$$red"; \
+ display_result_count $$opts "ERROR:" $$error "$$mgn"; \
}; \
## Write "global" testsuite log.
if { \
--
1.7.9.5
- [Automake-ng] [PATCH 00/10] Rewrite parallel-tests to rely on GNU make capabilities, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 02/10] [ng] cleanup: simplify %transforms for parallel-tests handling, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 05/10] [ng] parallel-tests: support "TESTS = $(srcdir)/foo.test", Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 04/10] [ng] coverage: parallel-tests and dynamic $(TESTS) content, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 01/10] [ng] parallel-tests: simplify, using pattern rules with multiple targets, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 03/10] [ng] parallel-tests: simplify automake-time preprocessing, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 07/10] [ng] tests: run long-running ones early (useful with parallel make), Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 06/10] [ng] build: define $(TESTS) through a wildcard, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 08/10] [ng] parallel-tests: remove obsolete comment, Stefano Lattarini, 2012/04/23
- [Automake-ng] [PATCH 09/10] [ng] parallel-tests: fix confusing function names in Makefile recipes,
Stefano Lattarini <=
- [Automake-ng] [PATCH 10/10] [ng] tests: fix a spurious failure on Solaris 10, Stefano Lattarini, 2012/04/23
- Re: [Automake-ng] [PATCH 00/10] Rewrite parallel-tests to rely on GNU make capabilities, Stefano Lattarini, 2012/04/26