From: Stefano Lattarini Date: Mon, 23 Apr 2012 08:57:29 +0000 (+0200) Subject: [ng] parallel-tests: fix confusing function names in Makefile recipes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66d406afde0e6639e389e9fdef060dc096613537;p=thirdparty%2Fautomake.git [ng] parallel-tests: fix confusing function names in Makefile recipes * 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 --- diff --git a/lib/am/check.am b/lib/am/check.am index 196110501..9c208920a 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 { \