summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/Makefile19
1 files changed, 9 insertions, 10 deletions
diff --git a/util/Makefile b/util/Makefile
index 3c20f550..375199e4 100644
--- a/util/Makefile
+++ b/util/Makefile
@@ -4,22 +4,21 @@ test:
@export PATH="$(CURDIR)/bin:$(PATH)"; \
tests="`find t -type f -executable`"; \
i=1; \
- pids="";\
n=`echo "$$tests" | wc -l`; \
echo $$i..$$n; \
for exe in $$tests; do \
{ \
./$$exe; \
- ret=$$?; \
- case $$ret in 0) result=ok;; *) result='not ok';; esac; \
+ case $$? in \
+ 0) result=ok;; \
+ *) result='not ok'; touch .test-not-ok;; \
+ esac; \
echo $$result $$i - $$exe; \
- exit $$ret;\
} & \
- pids="$${pids} $$!" \
i=$$(( i+1 )); \
done; \
- ret=0;\
- for pid in $$pids; do \
- wait $$pid || ret=23;\
- done; \
- exit $$ret;
+ wait; \
+ if test -e .test-not-ok; then \
+ rm .test-not-ok; \
+ exit 23; \
+ fi