/*
Sample test application.
*/
+
+#include "config.h"
+
+#include <unistd.h>
+
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/wait.h>
#include <unistd.h>
#include <time.h>
-#include <fnmatch.h>
#include <stdint.h>
+#include "libmemcached/memcached.h"
+
#include "test.h"
static void world_stats_print(world_stats_st *stats)
fprintf(stderr, "\tSucceeded\t\t%u\n", stats->success);
}
-static long int timedif(struct timeval a, struct timeval b)
+long int timedif(struct timeval a, struct timeval b)
{
long us, s;
world_stats_st stats;
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+ if (sasl_client_init(NULL) != SASL_OK)
+ {
+ fprintf(stderr, "Failed to initialize sasl library!\n");
+ return 1;
+ }
+#endif
+
memset(&stats, 0, sizeof(stats));
memset(&world, 0, sizeof(world));
get_world(&world);
world_stats_print(&stats);
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+ sasl_done();
+#endif
+
return stats.failed == 0 ? 0 : 1;
}