Sample test application.
*/
-#include "config.h"
+#include <config.h>
#include <unistd.h>
#include <time.h>
#include <stdint.h>
-#include <libmemcached/memcached.h>
-
#include <libtest/test.h>
+#include <libtest/failed.h>
static void world_stats_print(world_stats_st *stats)
{
}
if (argc > 1)
+ {
collection_to_run= argv[1];
+ }
+ else if (getenv("TEST_COLLECTION"))
+ {
+ collection_to_run= getenv("TEST_COLLECTION");
+ }
+
+ if (collection_to_run)
+ printf("Only testing %s\n", collection_to_run);
if (argc == 3)
+ {
wildcard= argv[2];
+ }
for (next= collection; next->name; next++)
{
stats.success++;
break;
case TEST_FAILURE:
+#if 0
+ push_failed_test(next->name, run->name);
+#endif
stats.failed++;
failed= true;
break;
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
{
world_stats_print(&stats);
-#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
- sasl_done();
-#endif
-
return stats.failed == 0 ? 0 : 1;
}