[cairo-commit] test/Makefile.am

Chris Wilson ickle at kemper.freedesktop.org
Sun Jan 13 07:01:17 PST 2008


 test/Makefile.am |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

New commits:
commit a5e5c1b5b04dd1d1138e96b7f4c097f14a1cd2cd
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jan 13 15:00:58 2008 +0000

    [test] Add a custom hook to summarise the failures.
    
    Add a check-local hook that scans the log fails and displays a list
    of failed tests (and the failing targets).

diff --git a/test/Makefile.am b/test/Makefile.am
index 8f5a198..b3c933a 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -529,6 +529,24 @@ ps-features			\
 multi-page			\
 fallback-resolution
 
+# A hook that summarises the failures
+check: AM_MAKEFLAGS+=-k
+check-local:
+	@FAILED_TESTS=""; \
+	for t in *.log; do \
+	    if grep -e '\<FAIL\>' $$t >/dev/null 2>&1; then \
+		FAILED_TESTS="$$FAILED_TESTS $${t%.log}"; \
+	    fi; \
+	done; \
+	if test -n "$$FAILED_TESTS"; then \
+	    echo "Failed tests:"; \
+	    for t in $$FAILED_TESTS; do \
+		echo -n "     $$t: "; \
+		grep -e '\<FAIL\>' $$t.log | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq | tr '\n' ' '; \
+		echo; \
+	    done; \
+	fi
+
 check_PROGRAMS =
 EXTRA_PROGRAMS =
 


More information about the cairo-commit mailing list