svn commit: trunk/uClibc/test

aldot at uclibc.org aldot at uclibc.org
Fri Jul 11 17:22:27 UTC 2008


Author: aldot
Date: 2008-07-11 10:22:26 -0700 (Fri, 11 Jul 2008)
New Revision: 22793

Log:
- add error-counter, do not immediately exit if a testcase fails but print
  the overall error-counter at the end and exit accordingly.


Modified:
   trunk/uClibc/test/
   trunk/uClibc/test/Makefile
   trunk/uClibc/test/Rules.mak
   trunk/uClibc/test/Test.mak


Changeset:

Property changes on: trunk/uClibc/test
___________________________________________________________________
Name: svn:ignore
   - hello
hello.o
hello_glibc
hello_glibc.o
testmalloc
testmalloc.o
testmalloc_glibc
testmalloc_glibc.o
   + hello
hello.o
hello_glibc
hello_glibc.o
testmalloc
testmalloc.o
testmalloc_glibc
testmalloc_glibc.o
.errcounter


Modified: trunk/uClibc/test/Makefile
===================================================================
--- trunk/uClibc/test/Makefile	2008-07-11 16:54:06 UTC (rev 22792)
+++ trunk/uClibc/test/Makefile	2008-07-11 17:22:26 UTC (rev 22793)
@@ -40,17 +40,18 @@
 endif
 DIRS := $(filter-out math,$(DIRS))
 
-
 test check all: run
 
 run: compile subdirs_run
 
 compile:subdirs_compile
+	@echo 0 > $(COUNTER)
 
 tags:
 	ctags -R
 
 clean: subdirs_clean
+	@rm -f $(COUNTER)
 
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_compile: $(patsubst %, _dircompile_%, $(DIRS))

Modified: trunk/uClibc/test/Rules.mak
===================================================================
--- trunk/uClibc/test/Rules.mak	2008-07-11 16:54:06 UTC (rev 22792)
+++ trunk/uClibc/test/Rules.mak	2008-07-11 17:22:26 UTC (rev 22793)
@@ -13,6 +13,8 @@
 
 TESTDIR=$(top_builddir)test/
 
+COUNTER = $(TESTDIR).errcounter
+
 include $(top_builddir)/Rules.mak
 ifndef TEST_INSTALLED_UCLIBC
 ifdef UCLIBC_LDSO

Modified: trunk/uClibc/test/Test.mak
===================================================================
--- trunk/uClibc/test/Test.mak	2008-07-11 16:54:06 UTC (rev 22792)
+++ trunk/uClibc/test/Test.mak	2008-07-11 17:22:26 UTC (rev 22793)
@@ -30,6 +30,7 @@
 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 @@
 	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)




More information about the uClibc-cvs mailing list