You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bo...@apache.org on 2007/09/10 07:32:44 UTC

svn commit: r574135 - in /apr/apr-util/trunk/test: Makefile.in testdate.c

Author: bojan
Date: Sun Sep  9 22:32:44 2007
New Revision: 574135

URL: http://svn.apache.org/viewvc?rev=574135&view=rev
Log:
Run all tests, then fail make if required

Modified:
    apr/apr-util/trunk/test/Makefile.in
    apr/apr-util/trunk/test/testdate.c

Modified: apr/apr-util/trunk/test/Makefile.in
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/Makefile.in?rev=574135&r1=574134&r2=574135&view=diff
==============================================================================
--- apr/apr-util/trunk/test/Makefile.in (original)
+++ apr/apr-util/trunk/test/Makefile.in Sun Sep  9 22:32:44 2007
@@ -21,26 +21,31 @@
 LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
 
 check: $(PROGRAMS)
+	teststatus=0; \
+	progfailed=""; \
 	for prog in $(PROGRAMS); do \
 	        if test "$$prog" = 'dbd'; then \
 			for driver in sqlite2 sqlite3; do \
 				./$$prog $$driver; \
 				status=$$?; \
 				if test $$status != 0; then \
-					echo "$$prog $$driver failed"; \
-					break; \
+					teststatus=$$status; \
+					progfailed="$$progfailed '$$prog $$driver'"; \
 				fi; \
 			done; \
 	        else \
 			./$$prog; \
 			status=$$?; \
 			if test $$status != 0; then \
-				echo "$$prog failed"; \
-				break; \
+				teststatus=$$status; \
+				progfailed="$$progfailed $$prog"; \
 			fi; \
 		fi; \
 	done; \
-	exit $$status
+	if test $$teststatus != 0; then \
+		echo "Programs failed:$$progfailed"; \
+	fi; \
+	exit $$teststatus
 
 dbd_OBJECTS = dbd.lo
 dbd_LDADD =  $(TARGET_LIB_PATH)

Modified: apr/apr-util/trunk/test/testdate.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testdate.c?rev=574135&r1=574134&r2=574135&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testdate.c (original)
+++ apr/apr-util/trunk/test/testdate.c Sun Sep  9 22:32:44 2007
@@ -161,7 +161,14 @@
         guess = lgc(guess);
         if (guess < 0)
             guess *= -1;
-        secstodate = guess + offset;
+
+        /* make sure it fits into time_t */
+        secstodate = (time_t)(guess + offset);
+
+        /* and is positive, taking into account we could be at _MIN */
+        if (secstodate < 0)
+            secstodate = -(secstodate + 1);
+
         gm_timestr_822(datestr, secstodate);
         secstodate *= APR_USEC_PER_SEC;
         newsecs = apr_date_parse_http(datestr);



Re: svn commit: r574135 - in /apr/apr-util/trunk/test: Makefile.in testdate.c

Posted by Bojan Smojver <bo...@rexursive.com>.
On Mon, 2007-09-10 at 05:32 +0000, bojan@apache.org wrote:

> Modified: apr/apr-util/trunk/test/testdate.c

Reverted in r574137. This was committed by accident.

-- 
Bojan