summaryrefslogtreecommitdiffstats
path: root/util/Makefile
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2014-02-27 01:19:39 +0100
committertv <tv@nomic.retiolum>2014-02-27 01:19:39 +0100
commitd2182ad7d1c009874063722e34f153b516bbd5cb (patch)
tree94f8ae770fa5776b69baccd0be99c61c22f67b77 /util/Makefile
parent43fb2f1208c45ae97002d61e131b40161709fbcf (diff)
util make test: touch .test-not-ok on error
Diffstat (limited to 'util/Makefile')
-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