diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-11-08 22:00:46 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-11-09 09:43:06 +0100 |
commit | 9985febd7847b7a9c09d6395db7f89490c83be30 (patch) | |
tree | fc4a346522fba7100e54e0e5a4700751257de983 | |
parent | b31da39f6f65d1784fc2f6915c30eb011cc2893b (diff) |
test: Produce autotools-looking report in the win32 build system
Tweak the commands used to run the tests on win32 to make the output
look mostly like that produced by the autotools test system.
In addition to this, make sure that the exit status of the test target
is success (0) if and only if no failure occurred.
-rw-r--r-- | test/Makefile.win32 | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/Makefile.win32 b/test/Makefile.win32 index 307ba0c..c88d087 100644 --- a/test/Makefile.win32 +++ b/test/Makefile.win32 @@ -19,7 +19,26 @@ BENCHS = $(patsubst %, $(CFG_VAR)/%.exe, $(BENCHMARKS)) all: inform $(TESTS) $(BENCHS) check: inform $(TESTS) - @for test in $(TESTS) ; do ./$$test && echo "PASS: $$test" || echo "FAIL: $$test" ; done + @failures=0 ; \ + total=0 ; \ + for test in $(TESTS) ; \ + do \ + total=`expr $$total + 1` ; \ + if ./$$test ; \ + then echo "PASS: $$test" ; \ + else echo "FAIL: $$test" ; \ + failures=`expr $$failures + 1` ; \ + fi ; \ + done ; \ + if test $$failures -eq 0 ; \ + then banner="All $$total tests passed" ; \ + else banner="$$failures of $$total tests failed" ; \ + fi ; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes" ; \ + echo "$$banner" ; \ + echo "$$dashes" ; \ + test $$failures -eq 0 $(CFG_VAR)/libutils.lib: $(libutils_OBJECTS) @$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^ |