X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=inline;f=tests%2Ftest.c;h=1de861ab6d7c5970e9b422c374668091f8fa66bb;hb=5845b33395414c577e0d88cc13a011db55cffa02;hp=d31f8bc5f68ac36b648b67b8cd5ae09e9ce3a79b;hpb=898a8a7a246d9f7fa712654eb855371b9a159b7c;p=awesomized%2Flibmemcached diff --git a/tests/test.c b/tests/test.c index d31f8bc5..1de861ab 100644 --- a/tests/test.c +++ b/tests/test.c @@ -2,7 +2,6 @@ Sample test application. */ #include -#include #include #include #include @@ -11,7 +10,6 @@ #include #include #include -#include "../lib/common.h" #include "test.h" @@ -34,6 +32,7 @@ int main(int argc, char *argv[]) char *wildcard= NULL; memcached_server_st *servers; collection_st *collection; + uint8_t failed; collection= gets_collections(); @@ -115,11 +114,15 @@ int main(int argc, char *argv[]) } gettimeofday(&start_time, NULL); - run->function(memc); + failed= run->function(memc); gettimeofday(&end_time, NULL); long int load_time= timedif(end_time, start_time); - fprintf(stderr, "\t\t\t\t\t %ld.%03ld [ ok ]\n", load_time / 1000, - load_time % 1000); + 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);