X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Ftest.c;h=60db54cbd8969269d3dad0b6468a4f6be50dc9f6;hb=b1d5d8be2237f04ccc99939399ebe7efad3f684e;hp=9ffe21c7e4e8d5dc4bf94d5b260235a2cf819775;hpb=9a993218013a44dd34cb809858f6eb8b8fb84a72;p=m6w6%2Flibmemcached diff --git a/tests/test.c b/tests/test.c index 9ffe21c7..60db54cb 100644 --- a/tests/test.c +++ b/tests/test.c @@ -10,11 +10,12 @@ #include #include #include +#include #include "test.h" #define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT+10 -#define TEST_SERVERS 2 +#define TEST_SERVERS 5 long int timedif(struct timeval a, struct timeval b) { @@ -106,7 +107,6 @@ int main(int argc, char *argv[]) for (x= 0; x < memcached_server_list_count(servers); x++) { printf("\t%s : %u\n", servers[x].hostname, servers[x].port); - assert(servers[x].stack_responses == 0); assert(servers[x].fd == -1); assert(servers[x].cursor_active == 0); } @@ -119,7 +119,7 @@ int main(int argc, char *argv[]) test_st *run; run= next->tests; - if (collection_to_run && strcmp(collection_to_run, next->name)) + if (collection_to_run && fnmatch(collection_to_run, next->name, 0)) continue; fprintf(stderr, "\n%s\n\n", next->name); @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) memcached_return rc; struct timeval start_time, end_time; - if (wildcard && strcmp(wildcard, run->name)) + if (wildcard && fnmatch(wildcard, run->name, 0)) continue; fprintf(stderr, "Testing %s", run->name); @@ -150,7 +150,6 @@ int main(int argc, char *argv[]) for (loop= 0; loop < memcached_server_list_count(servers); loop++) { - assert(memc->hosts[loop].stack_responses == 0); assert(memc->hosts[loop].fd == -1); assert(memc->hosts[loop].cursor_active == 0); } @@ -158,9 +157,7 @@ int main(int argc, char *argv[]) if (next->pre) { memcached_return rc; - WATCHPOINT_STRING(next->name); rc= next->pre(memc); - WATCHPOINT; if (rc != MEMCACHED_SUCCESS) {