aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2015-03-10 15:13:14 -0700
committerRoland McGrath <roland@hack.frob.com>2015-03-10 15:13:14 -0700
commit44a6213c8eebf3f69712a5fba9a33bbb90a79023 (patch)
tree692ef562f276436103f25b145b49d2f529705131 /Makefile
parentd3821ab0ace5bd33e7132488c4564ea2371840d8 (diff)
downloadtermbaud-44a6213c8eebf3f69712a5fba9a33bbb90a79023.tar.gz
termbaud-44a6213c8eebf3f69712a5fba9a33bbb90a79023.tar.xz
termbaud-44a6213c8eebf3f69712a5fba9a33bbb90a79023.zip
Let tests result in UNSUPPORTED; use that for unbuildable C++ cases
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 9 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 17e796fe1bb..7edf517724f 100644
--- a/Makefile
+++ b/Makefile
@@ -316,6 +316,13 @@ $(objpfx)begin-end-check.out: scripts/begin-end-check.pl
$(evaluate-test)
endif
+define summarize-tests
+@egrep -v '^(PASS|XFAIL):' $(objpfx)$1 || true
+@echo "Summary of test results$2:"
+@sed 's/:.*//' < $(objpfx)$1 | sort | uniq -c
+@egrep -q -v '^(X?PASS|XFAIL|UNSUPPORTED):' $(objpfx)$1 && false
+endef
+
tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special))
tests: $(tests-special)
$(..)scripts/merge-test-results.sh -s $(objpfx) "" \
@@ -324,22 +331,12 @@ tests: $(tests-special)
$(..)scripts/merge-test-results.sh -t $(objpfx) subdir-tests.sum \
$(sort $(subdirs) .) \
> $(objpfx)tests.sum
- @grep '^ERROR:' $(objpfx)tests.sum || true
- @grep '^FAIL:' $(objpfx)tests.sum || true
- @echo "Summary of test results:"
- @sed 's/:.*//' < $(objpfx)tests.sum | sort | uniq -c
- @if grep -q '^ERROR:' $(objpfx)tests.sum; then exit 1; fi
- @if grep -q '^FAIL:' $(objpfx)tests.sum; then exit 1; fi
+ $(call summarize-tests,tests.sum)
xtests:
$(..)scripts/merge-test-results.sh -t $(objpfx) subdir-xtests.sum \
$(sort $(subdirs)) \
> $(objpfx)xtests.sum
- @grep '^ERROR:' $(objpfx)xtests.sum || true
- @grep '^FAIL:' $(objpfx)xtests.sum || true
- @echo "Summary of test results for extra tests:"
- @sed 's/:.*//' < $(objpfx)xtests.sum | sort | uniq -c
- @if grep -q '^ERROR:' $(objpfx)xtests.sum; then exit 1; fi
- @if grep -q '^FAIL:' $(objpfx)xtests.sum; then exit 1; fi
+ $(call summarize-tests,xtests.sum, for extra tests)
# The realclean target is just like distclean for the parent, but we want
# the subdirs to know the difference in case they care.