diff options
author | Morgan Deters <mdeters@gmail.com> | 2012-08-28 18:38:19 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2012-08-28 18:38:19 +0000 |
commit | 026c17ed39f34f34d44b676131af64b3c8a4866f (patch) | |
tree | 86cb292680481fadb73db12b6198cce7eb6fc9e8 | |
parent | b75096dde1f691e14e0300acfb8ea648e7331b2a (diff) |
test summaries for automake 1.12 test harness
-rw-r--r-- | test/Makefile.am | 36 |
1 files changed, 34 insertions, 2 deletions
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 |