summaryrefslogtreecommitdiff
path: root/test/Test.mak
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-07-11 17:22:26 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-07-11 17:22:26 +0000
commit1a4af4684c659a37625785fab9422de206c7991c (patch)
tree20be8b55e78d7e72f1445426b9d621ddc1f2700d /test/Test.mak
parent80e7510b59d85f1c0728bb9ff80e823973e5b54b (diff)
- add error-counter, do not immediately exit if a testcase fails but print
the overall error-counter at the end and exit accordingly.
Diffstat (limited to 'test/Test.mak')
-rw-r--r--test/Test.mak8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Test.mak b/test/Test.mak
index dc587deca..dc416dc7d 100644
--- a/test/Test.mak
+++ b/test/Test.mak
@@ -30,6 +30,7 @@ endif
ifeq ($(UCLIBC_ONLY),)
TARGETS += $(G_TARGETS)
endif
+
CLEAN_TARGETS := $(U_TARGETS) $(G_TARGETS)
COMPILE_TARGETS := $(TARGETS)
RUN_TARGETS := $(patsubst %,%.exe,$(TARGETS))
@@ -65,13 +66,18 @@ define exec_test
if ! test $$ret -eq $$expected_ret ; then \
echo "ret == $$ret ; expected_ret == $$expected_ret" ; \
cat "$(binary_name).out" ; \
- exit 1 ; \
+ numerr="`cat $(COUNTER)`" ; \
+ expr $$numerr + 1 > $(COUNTER) ; \
fi
$(SCAT) "$(binary_name).out"
endef
test check all: run
run: $(RUN_TARGETS) compile
+ @numerr="`cat $(COUNTER)`" ; \
+ echo "Encountered $$numerr errors" ; \
+ test $$numerr -eq 0 || exit 1
+
$(RUN_TARGETS): $(TARGETS)
$(exec_test)
$(diff_test)