Fixing failure of socket issue.
[m6w6/libmemcached] / tests / test.c
index e5f4bc84911fb7ae1cd5e086a6dda843ff9f11f6..990f15e7483afc02e4dc2d22f79404aa4274ce20 100644 (file)
 #include <sys/stat.h>
 #include <unistd.h>
 #include <time.h>
+#include <fnmatch.h>
 
 #include "test.h"
 
 #define TEST_PORT_BASE MEMCACHED_DEFAULT_PORT+10 
-#define TEST_SERVERS 3
+#define TEST_SERVERS 5
 
 long int timedif(struct timeval a, struct timeval b)
 {
@@ -119,7 +120,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, FNM_CASEFOLD))
       continue;
 
     fprintf(stderr, "\n%s\n\n", next->name);
@@ -131,7 +132,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, FNM_CASEFOLD))
         continue;
 
       fprintf(stderr, "Testing %s", run->name);