automake-ng
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]