From 55e8ff7f93260d2a427daeec56dafdfa418368e5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 09 Sep 2012 18:31:18 -0400 Subject: Add pass/fail logic for tests to build system. --- (limited to 'tests') 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} -- cgit v0.9.1