From: Brian Aker Date: Wed, 18 Sep 2013 06:16:20 +0000 (-0700) Subject: Cleanup memdump's world_create X-Git-Tag: 1.0.18~17^2~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=f1b882e65cb7da1344405d25d5c4db150785ee59;p=m6w6%2Flibmemcached Cleanup memdump's world_create --- diff --git a/tests/cli.am b/tests/cli.am index df206e5c..1bb9a6a9 100644 --- a/tests/cli.am +++ b/tests/cli.am @@ -122,3 +122,12 @@ valgrind-memerror: tests/memerror valgrind-memtouch: tests/memtouch @$(VALGRIND_COMMAND) tests/memtouch + +test-memdump: tests/memdump + tests/memdump + +gdb-memdump: tests/memdump + @$(GDB_COMMAND) tests/memdump + +valgrind-memdump: tests/memdump + @$(VALGRIND_COMMAND) tests/memdump diff --git a/tests/memdump.cc b/tests/memdump.cc index 2a502371..ab59c3ce 100644 --- a/tests/memdump.cc +++ b/tests/memdump.cc @@ -111,19 +111,11 @@ collection_st collection[] ={ {0, 0, 0, 0} }; -static void *world_create(server_startup_st& servers, test_return_t& error) +static void *world_create(server_startup_st& servers, test_return_t&) { - if (libtest::has_memcached() == false) - { - error= TEST_SKIPPED; - return NULL; - } - - if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false) - { - error= TEST_FAILURE; - return NULL; - } + SKIP_UNLESS(libtest::has_memcached()); + + ASSERT_TRUE(server_startup(servers, "memcached", libtest::default_port(), NULL)); return &servers; }