List:Commits« Previous MessageNext Message »
From:jbalint Date:July 6 2007 11:28pm
Subject:Connector/ODBC 3.51 commit: r552 - trunk/test/include
View as plain text  
Modified:
   trunk/test/include/odbctap.h
Log:
setup odbctap.h to count test failures and return this as the test program return code
(mainly for cmake/ctest to detect failures since it's not parsing the TAP)

Modified: trunk/test/include/odbctap.h
===================================================================
--- trunk/test/include/odbctap.h	2007-07-05 22:57:00 UTC (rev 551)
+++ trunk/test/include/odbctap.h	2007-07-06 21:28:57 UTC (rev 552)
@@ -110,7 +110,7 @@
   SQLHENV  henv; \
   SQLHDBC  hdbc; \
   SQLHSTMT hstmt; \
-  int      i, num_tests; \
+  int      i, num_tests, failcnt= 0; \
   ENABLE_ALARMS; \
 \
   /* Set from environment, possibly overrided by command line */ \
@@ -156,6 +156,8 @@
            (tests[i].expect == FAIL ? "# TODO" : \
             rc == SKIP ? "# SKIP " : ""), \
            SKIP_REASON ? SKIP_REASON : ""); \
+    if (rc == FAIL != tests[i].expect) \
+      failcnt++; \
     SKIP_REASON= NULL; /* Reset SKIP_REASON */ \
     /* Re-allocate statement to reset all its properties. */ \
     SQLFreeStmt(hstmt, SQL_DROP); \
@@ -164,7 +166,7 @@
 \
   free_basic_handles(&henv,&hdbc,&hstmt); \
 \
-  exit(0); \
+  exit(failcnt); \
 }
 
 

Thread
Connector/ODBC 3.51 commit: r552 - trunk/test/includejbalint7 Jul