Next pass through the framework. Also removing boost files since we don't use them...
authorBrian Aker <brian@tangent.org>
Wed, 6 Jul 2011 20:26:23 +0000 (13:26 -0700)
committerBrian Aker <brian@tangent.org>
Wed, 6 Jul 2011 20:26:23 +0000 (13:26 -0700)
15 files changed:
libtest/framework.cc
libtest/framework.h
libtest/include.am
libtest/memcached.cc
libtest/server.cc
libtest/server.h
libtest/test.cc
m4/pandora_have_libboost_date_time.m4 [deleted file]
m4/pandora_have_libboost_filesystem.m4 [deleted file]
m4/pandora_have_libboost_iostreams.m4 [deleted file]
m4/pandora_have_libboost_options.m4 [deleted file]
m4/pandora_have_libboost_regex.m4 [deleted file]
m4/pandora_have_libboost_test.m4 [deleted file]
m4/pandora_have_libboost_thread.m4 [deleted file]
tests/include.am

index 22a4f64983ce545c3a8b7407856bf56fe80ee01e..fab8a80aea1795086d5863e9d45b02a3bdbb8b14 100644 (file)
@@ -93,11 +93,12 @@ test_return_t Framework::Item::startup(void* arg)
   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;
index d3b8264063731f5997d416eb31c6249d44141e49..6cc2a5d11f94311b71b92814838901bf10ff6cc3 100644 (file)
@@ -19,7 +19,7 @@ struct Framework {
   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;
index 0f4d910dd97906238c2a64c2e5000e685faab27f..059ee7413a2aba9b0786806abc7fed4c7e2f7344 100644 (file)
@@ -11,6 +11,8 @@
 
 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/* \
index adaa30f617df920721d23dc8da5b38ce2b161f6d..04e6986069e463123a1142b7e87ec32efc603c97 100644 (file)
@@ -63,9 +63,6 @@
 #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_stserver)
+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
@@ -126,18 +123,12 @@ bool server_startup(server_startup_st *construct)
   }
   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;
@@ -147,22 +138,22 @@ bool server_startup(server_startup_st *construct)
 
         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;
       }
@@ -172,76 +163,84 @@ bool server_startup(server_startup_st *construct)
         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+= "\" ";
       }
     }
@@ -258,11 +257,8 @@ bool server_startup(server_startup_st *construct)
 
 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();
 }
index d9175dba0516140b0ca20403641f323d59fe41fc..cb15aee94cbd2250636697681e7b78dc5a5ea577 100644 (file)
@@ -47,11 +47,11 @@ std::ostream& operator<<(std::ostream& output, const server_st &arg)
 {
   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
 }
@@ -67,6 +67,29 @@ static void global_sleep(void)
 #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())
@@ -148,5 +171,27 @@ bool server_st::kill()
   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();
+}
index 198e0f6abdc3b8981abcd3aece67c3d63976ac93..f3bda21b99fa581b8b0e3ca2a5dc9ab8ae173177 100644 (file)
@@ -14,6 +14,7 @@
 #include <netinet/in.h>
 #include <string>
 #include <unistd.h>
+#include <vector>
 
 #define SERVERS_TO_CREATE 5
 
@@ -31,21 +32,12 @@ private:
   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)
   {
@@ -53,6 +45,14 @@ public:
     __ping= ping_arg;
   }
 
+  const char *hostname() const
+  {
+    if (_hostname.empty())
+      return "";
+
+    return _hostname.c_str();
+  }
+
   bool ping()
   {
     if (__ping)
@@ -110,12 +110,7 @@ public:
 
   bool is_socket() const
   {
-    return hostname[0] == '/';
-  }
-
-  void set_hostname(const char *arg)
-  {
-    strncpy(hostname, arg, sizeof(hostname));
+    return _hostname[0] == '/';
   }
 
   bool kill();
@@ -132,13 +127,16 @@ struct server_startup_st
   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();
 };
 
index 29c26ca447fa3698913f923b9813ee8c1dd54ac7..b07340e43284a09da377fb4e62d70de3bfa155e2 100644 (file)
@@ -200,7 +200,7 @@ int main(int argc, char *argv[])
   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;
diff --git a/m4/pandora_have_libboost_date_time.m4 b/m4/pandora_have_libboost_date_time.m4
deleted file mode 100644 (file)
index 71c3efe..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-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}]))
-])
-
diff --git a/m4/pandora_have_libboost_filesystem.m4 b/m4/pandora_have_libboost_filesystem.m4
deleted file mode 100644 (file)
index ea6953e..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-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}]))
-])
-
diff --git a/m4/pandora_have_libboost_iostreams.m4 b/m4/pandora_have_libboost_iostreams.m4
deleted file mode 100644 (file)
index e9ac7b6..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-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}]))
-])
-
diff --git a/m4/pandora_have_libboost_options.m4 b/m4/pandora_have_libboost_options.m4
deleted file mode 100644 (file)
index 43fc03f..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-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}]))
-])
-
diff --git a/m4/pandora_have_libboost_regex.m4 b/m4/pandora_have_libboost_regex.m4
deleted file mode 100644 (file)
index 50a496a..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-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}]))
-])
-
diff --git a/m4/pandora_have_libboost_test.m4 b/m4/pandora_have_libboost_test.m4
deleted file mode 100644 (file)
index 7a526c0..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-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}]))
-])
-
diff --git a/m4/pandora_have_libboost_thread.m4 b/m4/pandora_have_libboost_thread.m4
deleted file mode 100644 (file)
index e3359fb..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-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}]))
-])
-
index d6d3dab0a4a520e478720d1d00db65fe5f48d2bd..557e4419f796334253e441b386d07cb6393bff92 100644 (file)
@@ -13,8 +13,6 @@ TESTS_LDADDS= \
              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