return TEST_SUCCESS;
}
-void* Framework::create(test_return_t* arg)
+void* Framework::create(test_return_t& arg)
{
+ arg= TEST_SUCCESS;
if (_create)
{
- return _creators_ptr= _create(arg);
+ return _creators_ptr= _create(&arg);
}
return NULL;
test_callback_create_fn *_create;
test_callback_fn *_destroy;
- void* create(test_return_t* arg);
+ void* create(test_return_t& arg);
/* This is called a the beginning of any collection run. */
test_callback_fn *collection_startup;
LIBUTEST_TMP = ${abs_top_builddir}/tests/var/tmp/
+VALGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
+
CLEANFILES+= \
tests/var/log/* \
tests/var/run/* \
#include <libtest/killpid.h>
#include <libtest/wait.h>
-#include <boost/lexical_cast.hpp>
-
-
#define CERR_PREFIX std::endl << __FILE__ << ":" << __LINE__ << " "
#define SOCKET_FILE "/tmp/memcached.socket"
static pid_t __getpid(server_st& server)
{
memcached_return_t rc;
- pid_t pid= libmemcached_util_getpid(server.hostname, server.port(), &rc);
+ pid_t pid= libmemcached_util_getpid(server.hostname(), server.port(), &rc);
return pid;
}
static bool __ping(server_st& server)
{
memcached_return_t rc;
- bool ret= libmemcached_util_ping(server.hostname, server.port(), &rc);
+ bool ret= libmemcached_util_ping(server.hostname(), server.port(), &rc);
return ret;
}
-static bool cycle_server(server_st& server)
+static bool cycle_server(server_st *server)
{
while (1)
{
- if (libmemcached_util_ping(server.hostname, server.port(), NULL))
+ if (libmemcached_util_ping(server->hostname(), server->port(), NULL))
{
// First we try to kill it, and on fail of that we flush it.
- pid_t pid= libmemcached_util_getpid(server.hostname, server.port(), NULL);
+ pid_t pid= libmemcached_util_getpid(server->hostname(), server->port(), NULL);
if (pid > 0 and kill_pid(pid))
{
- std::cerr << CERR_PREFIX << "Killed existing server," << server << " with pid:" << pid << std::endl;
+ std::cerr << CERR_PREFIX << "Killed existing server," << *server << " with pid:" << pid << std::endl;
continue;
}
- else if (libmemcached_util_flush(server.hostname, server.port(), NULL)) // If we can flush it, we will just use it
+ else if (libmemcached_util_flush(server->hostname(), server->port(), NULL)) // If we can flush it, we will just use it
{
- std::cerr << CERR_PREFIX << "Found server on port " << int(server.port()) << ", flushed it!" << std::endl;
- server.set_used();
+ std::cerr << CERR_PREFIX << "Found server on port " << int(server->port()) << ", flushed it!" << std::endl;
+ server->set_used();
return true;
} // No idea what is wrong here, so we need to find a different port
else
}
else
{
- for (uint32_t x= 0; x < construct->count; x++)
- {
- server_st &server= construct->server[x];
- server.set_methods(__getpid, __ping);
- }
-
std::string server_config_string;
uint32_t port_base= 0;
for (uint32_t x= 0; x < (construct->count -1); x++)
{
- server_st &server= construct->server[x];
+ server_st *server= NULL;
{
char *var;
if ((var= getenv(variable_buffer)))
{
- server.set_port((in_port_t)atoi(var));
+ server= new server_st((in_port_t)atoi(var), __getpid, __ping);
}
else
{
- server.set_port(in_port_t(x + TEST_PORT_BASE + port_base));
+ server= new server_st(in_port_t(x +TEST_PORT_BASE +port_base), __getpid, __ping);
while (not cycle_server(server))
{
- std::cerr << CERR_PREFIX << "Found server " << server << ", could not flush it, so trying next port." << std::endl;
+ std::cerr << CERR_PREFIX << "Found server " << *server << ", could not flush it, so trying next port." << std::endl;
port_base++;
- server.set_port(in_port_t(x + TEST_PORT_BASE + port_base));
+ server->set_port(in_port_t(x +TEST_PORT_BASE +port_base));
}
}
}
- if (server.is_used())
+ if (server->is_used())
{
std::cerr << std::endl << "Using server at : " << server << std::endl;
}
if (x == 0)
{
snprintf(buffer, sizeof(buffer), "%s -d -t 1 -p %u -U %u -m 128",
- MEMCACHED_BINARY, server.port(), server.port());
+ MEMCACHED_BINARY, server->port(), server->port());
}
else
{
snprintf(buffer, sizeof(buffer), "%s -d -t 1 -p %u -U %u",
- MEMCACHED_BINARY, server.port(), server.port());
+ MEMCACHED_BINARY, server->port(), server->port());
}
- server.set_command(buffer);
+ server->set_command(buffer);
- if (not server.start())
+ if (not server->start())
{
std::cerr << CERR_PREFIX << "Failed system(" << buffer << ")" << std::endl;
+ delete server;
return false;
}
- std::cerr << "STARTING SERVER: " << buffer << " pid:" << server.pid() << std::endl;
+ std::cerr << "STARTING SERVER: " << buffer << " pid:" << server->pid() << std::endl;
+ }
+ construct->push_server(server);
+
+ if (x == 0)
+ {
+ assert(server->has_port());
+ set_default_port(server->port());
}
+ char port_str[NI_MAXSERV];
+ snprintf(port_str, sizeof(port_str), "%u", int(server->port()));
+
server_config_string+= "--server=";
- server_config_string+= server.hostname;
+ server_config_string+= server->hostname();
server_config_string+= ":";
- server_config_string+= boost::lexical_cast<std::string>(server.port());
+ server_config_string+= port_str;
server_config_string+= " ";
}
// Socket
{
- server_st &server= construct->server[construct->count -1];
+ std::string socket_file(SOCKET_FILE);
+ char *var;
+
+ if ((var= getenv("LIBMEMCACHED_SOCKET")))
{
- std::string socket_file;
- char *var;
+ socket_file= var;
+ }
- server.set_hostname(SOCKET_FILE);
+ server_st *server= new server_st(SOCKET_FILE, __getpid, __ping);
- if ((var= getenv("LIBMEMCACHED_SOCKET")))
- {
- socket_file+= var;
- }
- else
- {
- if (not cycle_server(server))
- {
- std::cerr << CERR_PREFIX << "Found server " << server << ", could not flush it, failing since socket file is not available." << std::endl;
- return false;
- }
- }
+ if (not cycle_server(server))
+ {
+ std::cerr << CERR_PREFIX << "Found server " << server << ", could not flush it, failing since socket file is not available." << std::endl;
+ return false;
}
- if (server.is_used())
+ if (server->is_used())
{
- std::cerr << std::endl << "Using server at : " << server << std::endl;
+ std::cerr << std::endl << "Using server at : " << *server << std::endl;
}
else
{
char buffer[FILENAME_MAX];
snprintf(buffer, sizeof(buffer), "%s -d -t 1 -s %s", MEMCACHED_BINARY, SOCKET_FILE);
- server.set_command(buffer);
+ server->set_command(buffer);
- if (not server.start())
+ if (not server->start())
{
std::cerr << CERR_PREFIX << "Failed system(" << buffer << ")" << std::endl;
+ delete server;
return false;
}
- std::cerr << "STARTING SERVER: " << buffer << " pid:" << server.pid() << std::endl;
+ std::cerr << "STARTING SERVER: " << buffer << " pid:" << server->pid() << std::endl;
}
+ set_default_socket(server->hostname());
+ construct->push_server(server);
{
- set_default_socket(server.hostname);
server_config_string+= "--socket=\"";
- server_config_string+= server.hostname;
+ server_config_string+= server->hostname();
server_config_string+= "\" ";
}
}
void server_shutdown(server_startup_st *construct)
{
- for (uint32_t x= 0; x < construct->count; x++)
- {
- if (construct->server[x].is_used())
- continue;
+ if (not construct)
+ return;
- construct->server[x].kill();
- }
+ construct->shutdown();
}
{
if (arg.is_socket())
{
- output << arg.hostname;
+ output << arg.hostname();
}
else
{
- output << arg.hostname << ":" << arg.port();
+ output << arg.hostname() << ":" << arg.port();
}
return output; // for multiple << operators
}
#endif
}
+server_st::server_st(in_port_t port_arg, test_server_getpid *get_pid_arg, test_server_ping *ping_arg) :
+ _used(false),
+ _pid(-1),
+ _port(port_arg),
+ __get_pid(get_pid_arg),
+ __ping(ping_arg),
+ _hostname("localhost")
+{
+ pid_file[0]= 0;
+}
+
+server_st::server_st(const std::string &socket_file, test_server_getpid *get_pid_arg, test_server_ping *ping_arg) :
+ _used(false),
+ _pid(-1),
+ _port(0),
+ __get_pid(get_pid_arg),
+ __ping(ping_arg),
+ _hostname(socket_file)
+{
+ pid_file[0]= 0;
+}
+
+
server_st::~server_st()
{
if (has_pid())
return false;
}
+void server_startup_st::push_server(server_st *arg)
+{
+ servers.push_back(arg);
+}
+
+void server_startup_st::shutdown()
+{
+ for (std::vector<server_st *>::iterator iter= servers.begin(); iter != servers.end(); iter++)
+ {
+ if ((*iter)->is_used())
+ continue;
+
+ (*iter)->kill();
+ }
+}
+
server_startup_st::~server_startup_st()
-{ }
+{
+ for (std::vector<server_st *>::iterator iter= servers.begin(); iter != servers.end(); iter++)
+ {
+ delete *iter;
+ }
+ servers.clear();
+}
#include <netinet/in.h>
#include <string>
#include <unistd.h>
+#include <vector>
#define SERVERS_TO_CREATE 5
std::string _command;
test_server_getpid *__get_pid;
test_server_ping *__ping;
+ std::string _hostname;
public:
+ server_st(in_port_t port_arg, test_server_getpid *, test_server_ping *);
- char hostname[NI_MAXHOST];
-
- server_st() :
- _used(false),
- _pid(-1),
- _port(0),
- __get_pid(NULL),
- __ping(NULL)
- {
- pid_file[0]= 0;
- strncpy(hostname, "localhost", sizeof(hostname));
- }
+ server_st(const std::string &socket_file, test_server_getpid *, test_server_ping *);
void set_methods(test_server_getpid *get_pid_arg, test_server_ping *ping_arg)
{
__ping= ping_arg;
}
+ const char *hostname() const
+ {
+ if (_hostname.empty())
+ return "";
+
+ return _hostname.c_str();
+ }
+
bool ping()
{
if (__ping)
bool is_socket() const
{
- return hostname[0] == '/';
- }
-
- void set_hostname(const char *arg)
- {
- strncpy(hostname, arg, sizeof(hostname));
+ return _hostname[0] == '/';
}
bool kill();
uint8_t count;
uint8_t udp;
std::string server_list;
- server_st server[SERVERS_TO_CREATE];
+ std::vector<server_st *> servers;
server_startup_st() :
count(SERVERS_TO_CREATE),
udp(0)
{ }
+ void shutdown();
+ void push_server(server_st *);
+
~server_startup_st();
};
get_world(world);
test_return_t error;
- void *creators_ptr= world->create(&error);
+ void *creators_ptr= world->create(error);
if (test_failed(error))
{
std::cerr << "create() failed" << std::endl;
+++ /dev/null
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST_DATE_TIME],[
- AC_REQUIRE([AC_LIB_PREFIX])
- AC_REQUIRE([ACX_PTHREAD])
-
- dnl --------------------------------------------------------------------
- dnl Check for Boost.Date_Time
- dnl --------------------------------------------------------------------
-
- AC_LANG_PUSH(C++)
- AC_LIB_HAVE_LINKFLAGS(boost_date_time-mt,,[
- #include <boost/date_time.hpp>
- ],[
- boost::gregorian::date weekstart(2002,2,1);
- ])
- AS_IF([test "x${ac_cv_libboost_date_time_mt}" = "xno"],[
- AC_LIB_HAVE_LINKFLAGS(boost_date_time,,[
- #include <boost/date_time.hpp>
- ],[
- boost::gregorian::date weekstart(2002,2,1);
- ])
- ])
- AC_LANG_POP()
-
- AM_CONDITIONAL(HAVE_BOOST_DATE_TIME,
- [test "x${ac_cv_libboost_date_time}" = "xyes" -o "x${ac_cv_libboost_date_time_mt}" = "xyes"])
- BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_DATE_TIME_MT} ${LTLIBBOOST_DATE_TIME}"
- AC_SUBST(BOOST_LIBS)
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST_DATE_TIME],[
- PANDORA_HAVE_BOOST($1)
- _PANDORA_SEARCH_BOOST_DATE_TIME($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST_DATE_TIME],[
- PANDORA_REQUIRE_BOOST($1)
- _PANDORA_SEARCH_BOOST_DATE_TIME($1)
- AS_IF([test "x${ac_cv_libboost_date_time}" = "xno" -a "x${ac_cv_libboost_date_time_mt}" = "xno"],
- AC_MSG_ERROR([Boost.Date_Time is required for ${PACKAGE}]))
-])
-
+++ /dev/null
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST_FILESYSTEM],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for Boost.Filesystem
- dnl --------------------------------------------------------------------
-
- AC_LANG_PUSH(C++)
- AC_LIB_HAVE_LINKFLAGS(boost_filesystem-mt,boost_system-mt,[
- #include <boost/filesystem.hpp>
- ],[
- boost::filesystem::path my_path("some_dir/file.txt");
- ])
- AS_IF([test "x${ac_cv_libboost_filesystem_mt}" = "xno"],[
- AC_LIB_HAVE_LINKFLAGS(boost_filesystem,boost_system,[
- #include <boost/filesystem.hpp>
- ],[
- boost::filesystem::path my_path("some_dir/file.txt");
- ])
- ])
- AC_LANG_POP()
-
- AM_CONDITIONAL(HAVE_BOOST_FILESYSTEM,
- [test "x${ac_cv_libboost_filesystem}" = "xyes" -o "x${ac_cv_libboost_filesystem_mt}" = "xyes"])
- BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_FILESYSTEM_MT} ${LTLIBBOOST_FILESYSTEM}"
- AC_DEFINE([BOOST_FILESYSTEM_DEPRECATED], [1],
- [Use the v2 interface until we can stop using old versions])
- AC_SUBST(BOOST_LIBS)
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST_FILESYSTEM],[
- PANDORA_HAVE_BOOST($1)
- _PANDORA_SEARCH_BOOST_FILESYSTEM($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST_FILESYSTEM],[
- PANDORA_REQUIRE_BOOST($1)
- _PANDORA_SEARCH_BOOST_FILESYSTEM($1)
- AS_IF([test "x${ac_cv_libboost_filesystem}" = "xno" -a "x${ac_cv_libboost_filesystem_mt}" = "xno"],
- AC_MSG_ERROR([Boost.Filesystem is required for ${PACKAGE}]))
-])
-
+++ /dev/null
-dnl Copyright (C) 2010 Andrew Hutchings
-dnl This file is free software; Andrew Hutchings
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST_IOSTREAMS],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for Boost.Iostreams
- dnl --------------------------------------------------------------------
-
- AC_LANG_PUSH(C++)
- AC_LIB_HAVE_LINKFLAGS(boost_iostreams-mt,,[
- #include <boost/iostreams/stream.hpp>
- #include <boost/iostreams/device/array.hpp>
- ],[
- const char* input= "hello world";
- boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input));
- ])
- AS_IF([test "x${ac_cv_libboost_iostreams_mt}" = "xno"],[
- AC_LIB_HAVE_LINKFLAGS(boost_iostreams,,[
- #include <boost/iostreams/stream.hpp>
- #include <boost/iostreams/device/array.hpp>
- ],[
- const char* input= "hello world";
- boost::iostreams::stream<boost::iostreams::array_source> in(input, strlen(input));
- ])
- ])
- AC_LANG_POP()
-
- AM_CONDITIONAL(HAVE_BOOST_IOSTREAMS,
- [test "x${ac_cv_libboost_iostreams}" = "xyes" -o "x${ac_cv_libboost_iostreams_mt}" = "xyes"])
- BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_IOSTREAMS_MT} ${LTLIBBOOST_IOSTREAMS}"
- AC_SUBST(BOOST_LIBS)
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST_IOSTREAMS],[
- PANDORA_HAVE_BOOST($1)
- _PANDORA_SEARCH_BOOST_IOSTREAMS($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST_IOSTREAMS],[
- PANDORA_REQUIRE_BOOST($1)
- _PANDORA_SEARCH_BOOST_IOSTREAMS($1)
- AS_IF([test "x${ac_cv_libboost_iostreams}" = "xno" -a "x${ac_cv_libboost_iostreams_mt}" = "xno"],
- AC_MSG_ERROR([Boost.Iostreams is required for ${PACKAGE}]))
-])
-
+++ /dev/null
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for boost::program_options
- dnl --------------------------------------------------------------------
-
- AC_LANG_PUSH(C++)
- AC_LIB_HAVE_LINKFLAGS(boost_program_options-mt,,[
- #include <boost/program_options.hpp>
- ],[
- boost::program_options::options_description d;
- d.add_options()("a","some option");
- ])
- AS_IF([test "x${ac_cv_libboost_program_options_mt}" = "xno"],[
- AC_LIB_HAVE_LINKFLAGS(boost_program_options,,[
- #include <boost/program_options.hpp>
- ],[
- boost::program_options::options_description d;
- d.add_options()("a","some option");
- ])
- ])
- AC_LANG_POP()
-
- AM_CONDITIONAL(HAVE_BOOST_PROGRAM_OPTIONS,
- [test "x${ac_cv_libboost_program_options}" = "xyes" -o "x${ac_cv_libboost_program_options_mt}" = "xyes"])
- BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_PROGRAM_OPTIONS} ${LTLIBBOOST_PROGRAM_OPTIONS_MT}"
- AC_SUBST(BOOST_LIBS)
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST_PROGRAM_OPTIONS],[
- PANDORA_HAVE_BOOST($1)
- _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST_PROGRAM_OPTIONS],[
- PANDORA_REQUIRE_BOOST($1)
- _PANDORA_SEARCH_BOOST_PROGRAM_OPTIONS($1)
- AS_IF([test "x${ac_cv_libboost_program_options}" = "xno" -a "x${ac_cv_libboost_program_options_mt}" = "xno"],
- AC_MSG_ERROR([boost::program_options is required for ${PACKAGE}]))
-])
-
+++ /dev/null
-dnl Copyright (C) 2010 Andrew Hutchings
-dnl This file is free software; Andrew Hutchings
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST_REGEX],[
- AC_REQUIRE([AC_LIB_PREFIX])
- AC_REQUIRE([ACX_PTHREAD])
-
- dnl --------------------------------------------------------------------
- dnl Check for boost::regex
- dnl --------------------------------------------------------------------
-
- save_CFLAGS="${CFLAGS}"
- save_CXXFLAGS="${CXXFLAGS}"
- CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
- CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
-
- AC_LANG_PUSH(C++)
- AC_LIB_HAVE_LINKFLAGS(boost_regex-mt,,[
- #include <boost/regex.hpp>
- ],[
- boost::regex test_regex("drizzle");
- ])
- AS_IF([test "x${ac_cv_libboost_regex_mt}" = "xno"],[
- AC_LIB_HAVE_LINKFLAGS(boost_regex,,[
- #include <boost/regex.hpp>
- ],[
- boost::regex test_regex("drizzle");
- ])
- ])
- AC_LANG_POP()
- CFLAGS="${save_CFLAGS}"
- CXXFLAGS="${save_CXXFLAGS}"
-
-
- AM_CONDITIONAL(HAVE_BOOST_REGEX,
- [test "x${ac_cv_libboost_regex}" = "xyes" -o "x${ac_cv_libboost_regex_mt}" = "xyes"])
- BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_REGEX_MT} ${LTLIBBOOST_REGEX}"
- AC_SUBST(BOOST_LIBS)
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST_REGEX],[
- PANDORA_HAVE_BOOST($1)
- _PANDORA_SEARCH_BOOST_REGEX($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST_REGEX],[
- PANDORA_REQUIRE_BOOST($1)
- _PANDORA_SEARCH_BOOST_REGEX($1)
- AS_IF([test "x${ac_cv_libboost_regex}" = "xno" -a "x${ac_cv_libboost_regex_mt}" = "xno"],
- AC_MSG_ERROR([boost::regex is required for ${PACKAGE}]))
-])
-
+++ /dev/null
-dnl Copyright (C) 2011 Andrew Hutchings
-dnl This file is free software; Andrew Hutchings
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST_TEST],[
- AC_REQUIRE([AC_LIB_PREFIX])
-
- dnl --------------------------------------------------------------------
- dnl Check for boost::test
- dnl --------------------------------------------------------------------
-
- AC_LANG_PUSH(C++)
- AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework-mt,,[
- #include <boost/test/unit_test.hpp>
- ],[
- boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);
- ])
- AS_IF([test "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],[
- AC_LIB_HAVE_LINKFLAGS(boost_unit_test_framework,,[
- #include <boost/test/unit_test.hpp>
- ],[
- boost::unit_test::unit_test_log.set_threshold_level(boost::unit_test::log_messages);
- ])
- ])
- AC_LANG_POP()
-
- AM_CONDITIONAL(HAVE_BOOST_TEST,
- [test "x${ac_cv_libboost_unit_test_framework}" = "xyes" -o "x${ac_cv_libboost_unit_test_framework_mt}" = "xyes"])
- BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_TEST_MT} ${LTLIBBOOST_TEST}"
- AC_SUBST(BOOST_LIBS)
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST_TEST],[
- PANDORA_HAVE_BOOST($1)
- _PANDORA_SEARCH_BOOST_TEST($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST_TEST],[
- PANDORA_REQUIRE_BOOST($1)
- _PANDORA_SEARCH_BOOST_TEST($1)
- AS_IF([test "x${ac_cv_libboost_unit_test_framework}" = "xno" -a "x${ac_cv_libboost_unit_test_framework_mt}" = "xno"],
- AC_MSG_ERROR([boost::test is required for ${PACKAGE}]))
-])
-
+++ /dev/null
-dnl Copyright (C) 2010 Monty Taylor
-dnl This file is free software; Monty Taylor
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([_PANDORA_SEARCH_BOOST_THREAD],[
- AC_REQUIRE([AC_LIB_PREFIX])
- AC_REQUIRE([ACX_PTHREAD])
-
- dnl --------------------------------------------------------------------
- dnl Check for boost::thread
- dnl --------------------------------------------------------------------
-
- save_CFLAGS="${CFLAGS}"
- save_CXXFLAGS="${CXXFLAGS}"
- CFLAGS="${PTHREAD_CFLAGS} ${CFLAGS}"
- CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}"
-
- AC_LANG_PUSH(C++)
- AC_LIB_HAVE_LINKFLAGS(boost_thread-mt,,[
- #include <boost/thread.hpp>
- ],[
- boost::thread id;
- ])
- AS_IF([test "x${ac_cv_libboost_thread_mt}" = "xno"],[
- AC_LIB_HAVE_LINKFLAGS(boost_thread,,[
- #include <boost/thread.hpp>
- ],[
- boost::thread id;
- ])
- ])
- AC_LANG_POP()
- CFLAGS="${save_CFLAGS}"
- CXXFLAGS="${save_CXXFLAGS}"
-
-
- AM_CONDITIONAL(HAVE_BOOST_THREAD,
- [test "x${ac_cv_libboost_thread}" = "xyes" -o "x${ac_cv_libboost_thread_mt}" = "xyes"])
- BOOST_LIBS="${BOOST_LIBS} ${LTLIBBOOST_THREAD_MT} ${LTLIBBOOST_THREAD}"
- AC_SUBST(BOOST_LIBS)
-])
-
-AC_DEFUN([PANDORA_HAVE_BOOST_THREAD],[
- PANDORA_HAVE_BOOST($1)
- _PANDORA_SEARCH_BOOST_THREAD($1)
-])
-
-AC_DEFUN([PANDORA_REQUIRE_BOOST_THREAD],[
- PANDORA_REQUIRE_BOOST($1)
- _PANDORA_SEARCH_BOOST_THREAD($1)
- AS_IF([test "x${ac_cv_libboost_thread}" = "xno" -a "x${ac_cv_libboost_thread_mt}" = "xno"],
- AC_MSG_ERROR([boost::thread is required for ${PACKAGE}]))
-])
-
libtest/libserver.la \
libtest/libtest.la
-VALGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
-
DEBUG_COMMAND= $(LIBTOOL) --mode=execute gdb
PAHOLE_COMMAND= $(LIBTOOL) --mode=execute pahole