diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.in | 20 |
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} |