From: Morgan Deters Date: Tue, 28 Aug 2012 18:38:19 +0000 (+0000) Subject: test summaries for automake 1.12 test harness X-Git-Tag: cvc5-1.0.0~7835 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=026c17ed39f34f34d44b676131af64b3c8a4866f;p=cvc5.git test summaries for automake 1.12 test harness --- diff --git a/test/Makefile.am b/test/Makefile.am index 932c79c02..de8220064 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -57,15 +57,18 @@ check-recursive: check-pre .PHONY: check-pre check-pre: @rm -f $(subdirs_to_check:=/test-suite.log) + +if AUTOMAKE_1_11 +# automake 1.11 version check-local: @$(am__tty_colors); \ echo $${blu}=============================== TESTING SUMMARY =============================$$std; \ if test -s "unit/test-suite.log"; then :; else \ echo "$${red}Unit tests did not run; maybe there were compilation problems ?$$std"; \ - fi; \ + fi; \ if test -s "system/test-suite.log"; then :; else \ echo "$${red}System tests did not run; maybe there were compilation problems ?$$std"; \ - fi; \ + fi; \ for dir in $(subdirs_to_check); do \ log=$$dir/test-suite.log; \ if test -s "$$log"; then \ @@ -79,3 +82,32 @@ check-local: fi; \ done; \ echo $${blu}=============================== TESTING SUMMARY =============================$$std +else +# automake 1.12 version +check-local: + @$(am__tty_colors); \ + echo $${blu}=============================== TESTING SUMMARY =============================$$std; \ + if test -s "unit/test-suite.log"; then :; else \ + echo "$${red}Unit tests did not run; maybe there were compilation problems ?$$std"; \ + fi; \ + if test -s "system/test-suite.log"; then :; else \ + echo "$${red}System tests did not run; maybe there were compilation problems ?$$std"; \ + fi; \ + for dir in $(subdirs_to_check); do \ + log=$$dir/test-suite.log; \ + if test -s "$$log"; then \ + status="`head -n 11 $$log | tail -7`"; \ + nicestatus="`echo $$status | sed 's/# [A-Z]*: 0 *//g;s/# \([A-Z]*\): \([0-9]*\)/\2 \1,/g;s/, *$$//;'`"; \ + if echo "$$status" | grep -q '# FAIL: 0' && \ + echo "$$status" | grep -q '# XPASS: 0' && \ + echo "$$status" | grep -q '# ERROR: 0' && \ + echo "$$status" | grep -q '# SKIP: 0'; then \ + printf "$$grn%-30s in $$dir$$std\\n" "$$nicestatus"; \ + else \ + echo "$$red$$nicestatus"; \ + echo " @abs_builddir@/$$log$$std"; \ + fi; \ + fi; \ + done; \ + echo $${blu}=============================== TESTING SUMMARY =============================$$std +endif