svn commit: trunk/uClibc++/tests
gkajmowi at uclibc.org
gkajmowi at uclibc.org
Mon Oct 9 17:27:40 UTC 2006
Author: gkajmowi
Date: 2006-10-09 10:27:40 -0700 (Mon, 09 Oct 2006)
New Revision: 16348
Log:
Catch thrown exceptions as errors and carry on.
Build test code separate from rest of tests - this speeds up compilation noticably.
Modified:
trunk/uClibc++/tests/Makefile
trunk/uClibc++/tests/testframework.h
Changeset:
Modified: trunk/uClibc++/tests/Makefile
===================================================================
--- trunk/uClibc++/tests/Makefile 2006-10-09 16:13:12 UTC (rev 16347)
+++ trunk/uClibc++/tests/Makefile 2006-10-09 17:27:40 UTC (rev 16348)
@@ -16,6 +16,9 @@
TEST_SRCS := $(filter-out excepttest.cpp,$(TEST_SRCS))
endif
+UTILITY_OBJS := $(patsubst %.cpp,%.o, $(UTILITY_SRCS))
+OLDUTILITY_OBJS := $(patsubst %.cpp,%-old.o, $(UTILITY_SRCS))
+
EXOBJS := $(patsubst %.cpp,%.o, $(TEST_SRCS))
OLDOBJS := $(patsubst %.cpp,%-old.o, $(TEST_SRCS))
@@ -37,11 +40,11 @@
test: all
$(MAKE) -C testoutput test
-$(ALLBIN): $(EXOBJS)
- $(WR_CXX) $(LDFLAGS) $(UTILITY_SRCS) -o $@ $@.o
+$(ALLBIN): $(EXOBJS) $(UTILITY_OBJS)
+ $(WR_CXX) $(LDFLAGS) $(UTILITY_OBJS) -o $@ $@.o
-$(OLDBIN): $(OLDOBJS)
- $(HOSTCXX) $(LDFLAGS) $(UTILITY_SRCS) -o $@ $@.o
+$(OLDBIN): $(OLDOBJS) $(OLDUTILITY_OBJS)
+ $(HOSTCXX) $(LDFLAGS) $(UTILITY_OBJS) -o $@ $@.o
$(EXOBJS): %.o : %.cpp
$(WR_CXX) $(CXXFLAGS) -o $@ -c $<
@@ -49,3 +52,9 @@
$(OLDOBJS): %-old.o : %.cpp
$(HOSTCXX) $(CXXOFLAGS) -o $@ -c $<
+$(UTILITY_OBJS): %.o : %.cpp
+ $(WR_CXX) $(CXXFLAGS) -o $@ -c $<
+
+$(OLDUTILITY_OBJS): %-old.o : %.cpp
+ $(HOSTCXX) $(CXXOFLAGS) -o $@ -c $<
+
Modified: trunk/uClibc++/tests/testframework.h
===================================================================
--- trunk/uClibc++/tests/testframework.h 2006-10-09 16:13:12 UTC (rev 16347)
+++ trunk/uClibc++/tests/testframework.h 2006-10-09 17:27:40 UTC (rev 16348)
@@ -20,11 +20,17 @@
++totalcount;
printf(".");
T retval;
- retval = f();
- if( val == retval){
- ++goodcount;
- }else{
- printf("(%lu)", totalcount);
+ try{
+ retval = f();
+ if( val == retval){
+ ++goodcount;
+ }else{
+ printf("(%lu)", totalcount);
+ ++badcount;
+ }
+ }
+ catch (...) {
+ printf("(e%lu)", totalcount);
++badcount;
}
}
More information about the uClibc-cvs
mailing list