summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-09 18:31:18 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-09 18:31:18 (EDT)
commit55e8ff7f93260d2a427daeec56dafdfa418368e5 (patch)
treeccd5694129e2bbef3ae008f4f469b823f29fd1d2 /tests
parent2f4be55e4c6e9aa3319458ba73a379e1bb8ed623 (diff)
Add pass/fail logic for tests to build system.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.in20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/Makefile.in b/tests/Makefile.in
index f638886..dadf382 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -26,8 +26,18 @@ SH = @sh@
TESTS = deps
-test: $(TESTS)
-
-$(TESTS):
- @printf ' SH %s.sh\n' '$@'
- @$(SH) '$@.sh'
+test:
+ @all=0; failed=0; \
+ for test in $(TESTS); do \
+ out="$$($(SH) "$${test}.sh")"; \
+ if [ $${?} -eq 0 ]; then \
+ printf 'PASS: %s\n' "$${test}"; \
+ else \
+ printf 'FAIL: %s\n' "$${test}"; \
+ echo "$${out}" | sed 's/^/ /'; \
+ failed=$$(($$failed + 1)); \
+ fi; \
+ all=$$(($$all + 1)); \
+ done; \
+ printf '%d out of %d tests failed\n' $${failed} $${all}; \
+ exit $${failed}