X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmemerror.cc;h=9b3ddd353ab9236d9097e8c12a700e6c10b9d35a;hb=7997ff8f76b3df9c1644e96c8096eb42e553f788;hp=00863475838620c3d9639029062737b566ebacb0;hpb=751e342e158ae65052ce098ccd64aa54e39312db;p=m6w6%2Flibmemcached diff --git a/tests/memerror.cc b/tests/memerror.cc index 00863475..9b3ddd35 100644 --- a/tests/memerror.cc +++ b/tests/memerror.cc @@ -42,7 +42,7 @@ #include #include -#include +#include using namespace libtest; @@ -50,7 +50,7 @@ using namespace libtest; #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif -static std::string executable; +static std::string executable("./clients/memerror"); static test_return_t help_TEST(void *) { @@ -111,16 +111,21 @@ collection_st collection[] ={ {0, 0, 0, 0} }; -static void *world_create(server_startup_st&, test_return_t&) +static void *world_create(server_startup_st&, test_return_t& error) { + if (libtest::has_memcached() == false) + { + error= TEST_SKIPPED; + return NULL; + } + return NULL; } -void get_world(Framework *world) +void get_world(libtest::Framework* world) { - executable= "./clients/memerror"; - world->collections= collection; - world->_create= world_create; + world->collections(collection); + world->create(world_create); }