If at least one test fails, make check should also fail.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 12 Oct 2012 20:24:14 +0000 (22:24 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 12 Oct 2012 20:24:14 +0000 (22:24 +0200)
Makefile

index 3e497f5..0bfad1f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -74,8 +74,10 @@ clean:
        $(RM) demo $(TESTS) libmovit.a $(OBJS) $(DEPS)
 
 check: $(TESTS)
+       FAIL=0; \
        for TEST in $(TESTS); do \
-           ./$$TEST; \
-       done
+           ./$$TEST || FAIL=1; \
+       done; \
+       exit $$FAIL
 
 .PHONY: clean check all