projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Updated pandora-build files to version 0.171
[awesomized/libmemcached]
/
tests
/
test.c
diff --git
a/tests/test.c
b/tests/test.c
index b177f64fdffdbb8a7d84f401ab5dcbd30691f10f..348df72bd9beb00464c444884de10e56306b2dfd 100644
(file)
--- a/
tests/test.c
+++ b/
tests/test.c
@@
-9,18
+9,23
@@
/*
Sample test application.
*/
/*
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 <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 <unistd.h>
#include <time.h>
-#include <fnmatch.h>
#include <stdint.h>
#include <stdint.h>
+#include "libmemcached/memcached.h"
+
#include "test.h"
static void world_stats_print(world_stats_st *stats)
#include "test.h"
static void world_stats_print(world_stats_st *stats)
@@
-37,7
+42,7
@@
static void world_stats_print(world_stats_st *stats)
fprintf(stderr, "\tSucceeded\t\t%u\n", stats->success);
}
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;
{
long us, s;
@@
-147,6
+152,14
@@
int main(int argc, char *argv[])
world_stats_st stats;
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);
memset(&stats, 0, sizeof(stats));
memset(&world, 0, sizeof(world));
get_world(&world);
@@
-350,5
+363,9
@@
cleanup:
world_stats_print(&stats);
world_stats_print(&stats);
+#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
+ sasl_done();
+#endif
+
return stats.failed == 0 ? 0 : 1;
}
return stats.failed == 0 ? 0 : 1;
}