From f1b882e65cb7da1344405d25d5c4db150785ee59 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Tue, 17 Sep 2013 23:16:20 -0700 Subject: [PATCH] Cleanup memdump's world_create --- tests/cli.am | 9 +++++++++ tests/memdump.cc | 16 ++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) 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; } -- 2.30.2