Organize ketama a bit more (ie lets keep it in its own little basket).
[m6w6/libmemcached] / libtest / test.c
index 009c4be5c7e9289c550b36b3c4cdb0a9bc726250..da989b179638bfd95eed8cacefd012fea200b5f7 100644 (file)
@@ -27,6 +27,7 @@
 #include <libmemcached/memcached.h>
 
 #include <libtest/test.h>
+#include <libtest/failed.h>
 
 static void world_stats_print(world_stats_st *stats)
 {
@@ -156,7 +157,7 @@ int main(int argc, char *argv[])
   if (sasl_client_init(NULL) != SASL_OK)
   {
      fprintf(stderr, "Failed to initialize sasl library!\n");
-     return 1;
+     return EXIT_FAILURE;
   }
 #endif
 
@@ -298,6 +299,9 @@ skip_pre:
         stats.success++;
         break;
       case TEST_FAILURE:
+#if 0
+        push_failed_test(next->name, run->name);
+#endif
         stats.failed++;
         failed= true;
         break;
@@ -343,6 +347,9 @@ cleanup:
   if (stats.collection_failed || stats.collection_skipped)
   {
     fprintf(stderr, "Some test failures and/or skipped test occurred.\n\n");
+#if 0
+    print_failed_test();
+#endif
   }
   else
   {
@@ -357,7 +364,7 @@ cleanup:
     if (error != TEST_SUCCESS)
     {
       fprintf(stderr, "Failure during shutdown.\n");
-      stats.failed++; // We do this to make our exit code return 1
+      stats.failed++; // We do this to make our exit code return EXIT_FAILURE
     }
   }