+ test_st *run;
+
+ run= next->tests;
+ if (collection_to_run && strcmp(collection_to_run, next->name))
+ continue;
+
+ fprintf(stderr, "\n%s\n\n", next->name);
+
+ for (x= 0; run->name; run++)
+ {
+ unsigned int loop;
+ memcached_st *memc;
+ memcached_return rc;
+ struct timeval start_time, end_time;
+
+ if (wildcard && strcmp(wildcard, run->name))
+ continue;
+
+ fprintf(stderr, "Testing %s", run->name);
+
+ memc= memcached_create(NULL);
+ assert(memc);
+
+ rc= memcached_server_push(memc, servers);
+ assert(rc == MEMCACHED_SUCCESS);
+
+ if (run->requires_flush)
+ {
+ memcached_flush(memc, 0);
+ memcached_quit(memc);
+ }
+
+ 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);
+ }
+
+ if (next->pre)
+ {
+ memcached_return rc;
+ rc= next->pre(memc);
+
+ if (rc != MEMCACHED_SUCCESS)
+ {
+ fprintf(stderr, "\t\t\t\t\t [ skipping ]\n");
+ goto error;
+ }
+ }
+
+ gettimeofday(&start_time, NULL);
+ failed= run->function(memc);
+ gettimeofday(&end_time, NULL);
+ long int load_time= timedif(end_time, start_time);
+ if (failed)
+ fprintf(stderr, "\t\t\t\t\t %ld.%03ld [ failed ]\n", load_time / 1000,
+ load_time % 1000);
+ else
+ fprintf(stderr, "\t\t\t\t\t %ld.%03ld [ ok ]\n", load_time / 1000,
+ load_time % 1000);
+
+ if (next->post)
+ (void)next->post(memc);
+
+ assert(memc);
+error:
+ memcached_free(memc);
+ }