cmake: build&run tests (sortof)
authorMichael Wallner <mike@php.net>
Fri, 31 Jan 2020 17:53:41 +0000 (18:53 +0100)
committerMichael Wallner <mike@php.net>
Fri, 31 Jan 2020 17:53:41 +0000 (18:53 +0100)
26 files changed:
.gitignore
CMakeLists.txt
Include.cmake
clients/CMakeLists.txt
docs/CMakeLists.txt
libhashkit/CMakeLists.txt
libmemcached/CMakeLists.txt
libmemcachedutil/CMakeLists.txt
libtest/CMakeLists.txt [new file with mode: 0644]
libtest/cmdline.cc
libtest/cmdline.h
libtest/has.cc
libtest/main.cc
libtest/memcached.cc
libtest/server.cc
libtest/server.h
libtest/yatlcon.h.in
tests/CMakeLists.txt [new file with mode: 0644]
tests/libmemcached-1.0/CMakeLists.txt [new file with mode: 0644]
tests/libmemcached-1.0/all_tests.cc
tests/libmemcached-1.0/all_tests_socket.cc
tests/libmemcached-1.0/callback_counter.cc
tests/libmemcached-1.0/callbacks.cc
tests/libmemcached-1.0/exist.cc
tests/libmemcached-1.0/fetch_all_results.cc
tests/libmemcached-1.0/haldenbrand.cc

index aa09fc4ded430668eb6b5645cebd33c361921f77..1786a72d944aedbae63f6f476eb1235d14e1c55c 100644 (file)
@@ -171,3 +171,4 @@ tests/testudp
 tests/var/
 tmp_chroot
 unittests/unittests
+venv/
index ff0a93a2c5e3b4618421a9521feedd02b9145a13..4993d05dd065cc259daad372c508e45ce7f3751c 100644 (file)
@@ -17,6 +17,8 @@ include(Config.cmake)
 include(Include.cmake)
 
 find_package(Threads REQUIRED)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+
 find_library(HAVE_LIBSASL NAMES sasl sasl2)
 check_header(sasl/sasl.h)
 
@@ -36,6 +38,7 @@ check_header(sys/socket.h)
 check_header(sys/time.h)
 check_header(sys/types.h)
 check_header(sys/un.h)
+check_header(sys/wait.h)
 check_header(time.h)
 check_header(umem.h)
 check_header(unistd.h)
@@ -62,6 +65,23 @@ check_header(cinttypes)
 check_debug()
 
 include_directories(${CMAKE_BINARY_DIR})
+set(AUTOHEADER_FILE mem_config.h)
+
+set(CLIENTS
+        memcapable
+        memcat
+        memcp
+        memdump
+        memerror
+        memexist
+        memflush
+        memparse
+        memping
+        memrm
+        memslap
+        memstat
+        memtouch
+        )
 
 add_subdirectory(clients)
 add_subdirectory(libhashkit)
@@ -70,7 +90,13 @@ add_subdirectory(libmemcached)
 add_subdirectory(libmemcached-1.0)
 add_subdirectory(libmemcachedutil)
 
+
+include(CTest)
+enable_testing()
+add_subdirectory(libtest)
+add_subdirectory(tests)
+
 add_subdirectory(docs)
 
 # keep last
-configure_file(mem_config.h.in ${CMAKE_BINARY_DIR}/mem_config.h @ONLY)
+configure_file(mem_config.h.in ${CMAKE_BINARY_DIR}/${AUTOHEADER_FILE} @ONLY)
index 5821e6de2a8f2c5e9fabec9f9510cf94ffaae94d..919fc630a5a30f29d3c7a509d847dbf9873e8e7b 100644 (file)
@@ -1,6 +1,12 @@
 
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
 
+function(set_test_target TARGET2)
+    foreach(TEST IN LISTS TESTS)
+        add_custom_command(TARGET ${TARGET2} POST_BUILD COMMAND ${TEST})
+    endforeach()
+endfunction()
+
 include(CheckTypeSize)
 include(CheckCSourceRuns)
 include(CheckIncludeFileCXX)
index 2c8dcac4cd50dc9e5fba149318132c54aa25c010..9f753f20f7e997ca2e0037176266bf62f767f8cd 100644 (file)
@@ -1,29 +1,9 @@
 
-set(CLIENTS
-        memcapable
-        memcat
-        memcp
-        memdump
-        memerror
-        memexist
-        memflush
-        memparse
-        memping
-        memrm
-        memslap
-        memstat
-        memtouch)
-
-add_library(libclient_utilities STATIC utilities.cc)
+add_library(libclient_utilities STATIC utilities.cc generator.cc execute.cc)
 add_library(client_utilities ALIAS libclient_utilities)
 target_include_directories(libclient_utilities PRIVATE ..)
 target_link_libraries(libclient_utilities libmemcachedinternal)
 
-add_library(libclient_slap STATIC generator.cc execute.cc)
-add_library(client_slap ALIAS libclient_slap)
-target_include_directories(libclient_slap PRIVATE ..)
-target_link_libraries(libclient_slap libmemcachedinternal)
-
 foreach(CLIENT IN LISTS CLIENTS)
     add_executable(${CLIENT} ${CLIENT}.cc)
     target_include_directories(${CLIENT} PRIVATE ..)
@@ -36,9 +16,9 @@ target_sources(memcapable PRIVATE ../libmemcached/byteorder.cc)
 
 # extra libs
 
-target_link_libraries(memcapable ${CMAKE_THREAD_LIBS_INIT})
+target_link_libraries(memcapable Threads::Threads)
 target_link_libraries(memping libmemcachedutil)
-target_link_libraries(memslap libclient_slap ${CMAKE_THREAD_LIBS_INIT})
+target_link_libraries(memslap Threads::Threads)
 
 # memaslap is special
 
@@ -50,5 +30,5 @@ if(LIBEVENT AND HAVE_C_STDATOMIC)
     add_executable(memaslap memaslap.c
             ms_conn.c ms_setting.c ms_sigsegv.c ms_stats.c ms_task.c ms_thread.c)
     target_include_directories(memaslap PRIVATE ..)
-    target_link_libraries(memaslap libclient_slap libclient_utilities ${LIBEVENT} ${CMAKE_THREAD_LIBS_INIT})
+    target_link_libraries(memaslap libclient_utilities ${LIBEVENT} Threads::Threads)
 endif()
index 31f30ca07cf4128f854da95294e6d35b80a4aff1..ace24785f753928b524dab0b114aa80d49fc57e3 100644 (file)
@@ -34,7 +34,7 @@ if(SPHINX_EXECUTABLE)
             "${SPHINX_BUILD_DIR}/conf.py"
             @ONLY)
 
-    add_custom_target("docs"
+    add_custom_target(html
             ${SPHINX_EXECUTABLE}
             -q -a -b html
             -c "${SPHINX_BUILD_DIR}"
@@ -44,7 +44,6 @@ if(SPHINX_EXECUTABLE)
             "${SPHINX_HTML_DIR}"
             BYPRODUCTS ${SPHINX_HTML_DIR}
             COMMENT "Build HTML documentation with Sphinx")
-    #list(APPEND ADDITIONAL_CLEAN_FILES ${SPHINX_CACHE_DIR} ${SPHINX_HTML_DIR})
     add_custom_target(man
             ${SPHINX_EXECUTABLE}
             -q -a -b man
@@ -55,5 +54,4 @@ if(SPHINX_EXECUTABLE)
             "${SPHINX_MAN_DIR}"
             BYPRODUCTS ${SPHINX_MAN_DIR}
             COMMENT "Build manpage documentation with Sphinx")
-    #list(APPEND ADDITIONAL_CLEAN_FILES ${SPHINX_CACHE_DIR} ${SPHINX_MAN_DIR})
 endif()
index dbb76dcfd6001799ecefc1243bcf3985c4345a08..fa87160050789f7356e1a098153170d5d004ec76 100644 (file)
@@ -35,5 +35,4 @@ set_target_properties(libhashkit PROPERTIES LIBRARY_OUTPUT_NAME hashkit)
 target_include_directories(libhashkit PRIVATE ..)
 target_compile_options(libhashkit PRIVATE -DBUILDING_HASHKIT)
 
-set(AUTOHEADER_FILE mem_config.h)
 configure_file(hashkitcon.h.in hashkitcon.h @ONLY)
index eca34f5d9fb666d6583e5db09a4257287445b9da..708b637d26b94ac43e74ea8afaa9956eb888e621 100644 (file)
@@ -66,7 +66,7 @@ add_library(libmemcached SHARED
         ${LIBMEMCACHED_SOURCES})
 add_library(memcached ALIAS libmemcached)
 set_target_properties(libmemcached PROPERTIES LIBRARY_OUTPUT_NAME memcached)
-target_link_libraries(libmemcached libhashkit ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
+target_link_libraries(libmemcached libhashkit Threads::Threads ${CMAKE_DL_LIBS})
 target_include_directories(libmemcached PRIVATE ..)
 target_compile_definitions(libmemcached PRIVATE -DBUILDING_LIBMEMCACHED)
 
@@ -74,6 +74,6 @@ add_library(libmemcachedinternal STATIC
         ${LIBMEMCACHED_SOURCES})
 add_library(memcachedinternal ALIAS libmemcachedinternal)
 set_target_properties(libmemcachedinternal PROPERTIES LIBRARY_OUTPUT_NAME memcachedinternal)
-target_link_libraries(libmemcachedinternal libhashkit ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
+target_link_libraries(libmemcachedinternal libhashkit Threads::Threads ${CMAKE_DL_LIBS})
 target_include_directories(libmemcachedinternal PRIVATE ..)
 target_compile_definitions(libmemcachedinternal PRIVATE -DBUILDING_LIBMEMCACHEDINTERNAL)
index 2bf1aa98ffc6e56daff66f823508a938d775086e..694a6cfd157c261236a9ff716719c566bded5127 100644 (file)
@@ -1,6 +1,4 @@
 
-find_package(Threads)
-
 add_library(libmemcachedutil SHARED
         ../libmemcached/backtrace.cc
         flush.cc
@@ -13,4 +11,4 @@ add_library(memcachedutil ALIAS libmemcachedutil)
 set_target_properties(libmemcachedutil PROPERTIES LIBRARY_OUTPUT_NAME memcachedutil)
 target_include_directories(libmemcachedutil PRIVATE ..)
 target_compile_definitions(libmemcachedutil PRIVATE -DBUILDING_LIBMEMCACHED)
-target_link_libraries(libmemcachedutil libmemcached ${CMAKE_THREAD_LIBS_INIT})
+target_link_libraries(libmemcachedutil libmemcached Threads::Threads)
diff --git a/libtest/CMakeLists.txt b/libtest/CMakeLists.txt
new file mode 100644 (file)
index 0000000..24686a3
--- /dev/null
@@ -0,0 +1,73 @@
+
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/tmp_chroot)
+file(GENERATE OUTPUT ${CMAKE_BINARY_DIR}/libtool CONTENT
+"#!/bin/bash
+shift
+exec $@
+")
+if(UNIX)
+    execute_process(COMMAND chmod +x ${CMAKE_BINARY_DIR}/libtool)
+endif()
+
+add_library(libtest STATIC
+        alarm.cc
+        binaries.cc
+        client.cc
+        cmdline.cc
+        collection.cc
+        comparison.cc
+        core.cc
+        cpu.cc
+        dns.cc
+        dream.cc
+        drizzled.cc
+        exception.cc
+        exception/fatal.cc
+        formatter.cc
+        framework.cc
+        gearmand.cc
+        has.cc
+        http.cc
+        is_local.cc
+        killpid.cc
+        libtool.cc
+        main.cc
+        memcached.cc
+        port.cc
+        result.cc
+        runner.cc
+        server.cc
+        server_container.cc
+        signal.cc
+        socket.cc
+        strerror.cc
+        timer.cc
+        tmpfile.cc
+        vchar.cc
+        )
+set_target_properties(libtest PROPERTIES LIBRARY_OUTPUT_NAME test)
+target_compile_definitions(libtest PRIVATE
+        BUILDING_LIBTEST=1
+        LIBTEST_TEMP=\"${CMAKE_BINARY_DIR}/tmp_chroot\"
+
+        DRIZZLED_BINARY=\"drizzled\"
+        GEARMAND_BINARY=\"gearmand\"
+        MEMCACHED_BINARY=\"/usr/bin/memcached\"
+        HAVE_MEMCACHED_BINARY=1
+        )
+target_link_libraries(libtest PRIVATE Threads::Threads ${CMAKE_DL_LIBS})
+target_include_directories(libtest PRIVATE ..)
+
+add_executable(wait wait.cc dream.cc)
+target_include_directories(wait PRIVATE ..)
+
+add_executable(core_count core_count.cc cpu.cc)
+target_include_directories(core_count PRIVATE ..)
+
+add_executable(abort abort.cc)
+add_executable(backtrace backtrace_test.cc ../libmemcached/backtrace.cc)
+target_link_libraries(backtrace PRIVATE ${CMAKE_DL_LIBS})
+target_include_directories(backtrace PRIVATE ..)
+
+configure_file(yatlcon.h.in yatlcon.h @ONLY)
+configure_file(version.h.in version.h @ONLY)
index cbe8ff9a53ea70754cf7c8aa6f98c3a666c68576..55e6b5b66ba0a31a3e6c7bf00ab3a68c73946c3c 100644 (file)
@@ -142,7 +142,7 @@ Application::Application(const std::string& arg, const bool _use_libtool_arg) :
     {
       if (libtool() == NULL)
       {
-        FATAL("libtool requested, but know libtool was found");
+        FATAL("libtool requested, but no libtool was found");
       }
     }
 
@@ -280,7 +280,16 @@ Application::error_t Application::run(const char *args[])
   {
     if (_will_fail == false)
     {
-      Error << strerror(spawn_ret) << "(" << spawn_ret << ")";
+      std::string sb;
+      char buf[1024];
+
+      std::for_each(built_argv.begin(), built_argv.end()-1, [&sb](const char *a) {
+        if (sb.size()) {
+          sb.append(" ");
+        }
+        sb.append(a);
+      });
+      Error << strerror(spawn_ret) << "(" << spawn_ret << "): " << sb << " cwd:" << getcwd(buf, sizeof(buf)-1);
     }
     _pid= -1;
     return Application::INVALID_POSIX_SPAWN;
@@ -410,6 +419,22 @@ bool Application::slurp()
   return data_was_read;
 }
 
+std::pair<std::string, std::string> Application::output()
+{
+  slurp();
+  return {
+      std::string {
+          stdout_result().data(),
+          stdout_result().size()
+      },
+      std::string {
+          stderr_result().data(),
+          stderr_result().size()
+      }
+  };
+
+}
+
 Application::error_t Application::join()
 {
   pid_t waited_pid= waitpid(_pid, &_status, WUNTRACED);
@@ -826,12 +851,18 @@ int exec_cmdline(const std::string& command, const char *args[], bool use_libtoo
 
   Application::error_t ret= app.run(args);
 
+  if (Application::SUCCESS == ret) {
+    ret = app.join();
+  }
+
   if (ret != Application::SUCCESS)
   {
-    return int(ret);
+    auto out = app.output();
+    Error << command << " stdout: " << out.first;
+    Error << command << " stderr: " << out.second;
   }
 
-  return int(app.join());
+  return int(ret);
 }
 
 } // namespace exec_cmdline
index 52ced4bfc658463324e21ce34a3ae2eeec2b109f..244c6464ff933eafb435e43a0e00140ebc596b49 100644 (file)
@@ -180,6 +180,7 @@ public:
   bool check() const;
 
   bool slurp();
+  std::pair<std::string, std::string> output();
   void murder();
 
   void clear()
index 0983f070301f6668f7ae97d5d3a4f8657ae6eded..6048bacf24cd806e955779459b5b347da06924d1 100644 (file)
@@ -75,13 +75,15 @@ bool has_libdrizzle(void)
 bool has_postgres_support(void)
 {
   char *getenv_ptr;
-  if (bool((getenv_ptr= getenv("POSTGES_IS_RUNNING_AND_SETUP"))))
+  if (bool((getenv_ptr= getenv("POSTGRES_IS_RUNNING_AND_SETUP"))))
   {
     (void)(getenv_ptr);
+#if defined(HAVE_LIBPQ) && HAVE_LIBPQ
     if (HAVE_LIBPQ)
     {
       return true;
     }
+#endif
   }
 
   return false;
index b93f75708c1f7b12e6d45c430e0201af70420bee..f20cb955713c1294d329b05bddfb2ef4e38ddabb 100644 (file)
@@ -263,12 +263,6 @@ int main(int argc, char *argv[])
     return EXIT_FAILURE;
   }
 
-  if (libtest::libtool() == NULL)
-  {
-    Error << "Failed to locate libtool";
-    return EXIT_FAILURE;
-  }
-
   if (getenv("YATL_COLLECTION_TO_RUN"))
   {
     if (strlen(getenv("YATL_COLLECTION_TO_RUN")))
index 7af26092c650a12be452f1af98ead09b1cba971f..7d43ec0ef04e7894b851a1590b0a8952e80c7b1e 100644 (file)
@@ -214,7 +214,7 @@ bool Memcached::build()
     add_option(sasl());
   }
 
-  add_option("-vv");
+  //add_option("-vv");
 
   return true;
 }
index 401218baeb32e1e3a5668f90cd3cdbff6190121e..bfb265cdb5811520b22a45d0a689ac36e29f1a96 100644 (file)
@@ -529,20 +529,4 @@ bool Server::kill()
   return false;
 }
 
-std::pair<std::string, std::string> Server::output()
-{
-  _app.slurp();
-  return {
-    std::string {
-      _app.stdout_result().data(),
-      _app.stdout_result().size()
-    },
-    std::string {
-      _app.stderr_result().data(),
-      _app.stderr_result().size()
-    }
-  };
-}
-
-
 } // namespace libtest
index 10c1d3745befe08fd3ff25852d78aeab9718ba78..73ad3bf846d3910676672211d84d00cdadf7d2ea 100644 (file)
@@ -205,7 +205,10 @@ public:
     _log_file.clear();
   }
 
-  std::pair<std::string, std::string> output();
+  std::pair<std::string, std::string> output()
+  {
+    return _app.output();
+  }
 
   pid_t pid() const;
 
index 17cb0aebf8198ff5e126ad8d83d3e56e502fdda1..e5adefb5ed0079ad74be0acff577db8be0559c85 100644 (file)
@@ -39,3 +39,9 @@
 #pragma once
 
 #include "@AUTOHEADER_FILE@"
+
+#ifndef LIBTEST_TEMP
+# define LIBTEST_TEMP "/tmp"
+#endif
+
+#define HAVE_LIBMEMCACHED 1
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644 (file)
index 0000000..f983db9
--- /dev/null
@@ -0,0 +1,55 @@
+
+add_subdirectory(libmemcached-1.0)
+
+add_executable(cycle cycle.cc)
+target_link_libraries(cycle PRIVATE libtest Threads::Threads)
+target_include_directories(cycle PRIVATE ..)
+add_test(cycle cycle)
+
+add_executable(parser parser.cc)
+target_link_libraries(parser PRIVATE libtest libmemcached)
+target_include_directories(parser PRIVATE ..)
+add_test(parser parser)
+
+add_executable(failure failure.cc)
+add_executable(testudp mem_udp.cc)
+
+foreach(TEST IN ITEMS failure testudp)
+    target_sources(${TEST} PRIVATE
+            libmemcached-1.0/callback_counter.cc
+            libmemcached-1.0/fetch_all_results.cc
+            libmemcached-1.0/generate.cc
+            libmemcached-1.0/print.cc
+            )
+    target_link_libraries(${TEST} PRIVATE
+            libclient_utilities
+            libmemcached
+            libmemcachedutil
+            libtest
+            )
+    target_include_directories(${TEST} PRIVATE ..)
+    add_test(${TEST} ${TEST})
+endforeach()
+
+add_executable(testhashkit hashkit_functions.cc)
+target_link_libraries(testhashkit PRIVATE libtest libhashkit)
+target_include_directories(testhashkit PRIVATE ..)
+add_test(hashkit testhashkit)
+
+add_executable(hash_plus hash_plus.cc)
+target_link_libraries(hash_plus PRIVATE libtest libhashkit)
+target_include_directories(hash_plus PRIVATE ..)
+add_test(hashplus hash_plus)
+
+foreach(CLIENT IN LISTS CLIENTS)
+    if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${CLIENT}.cc)
+        add_executable(test${CLIENT} ${CLIENT}.cc)
+        target_link_libraries(test${CLIENT} PRIVATE
+                libmemcached
+                libmemcachedutil
+                libtest
+                )
+        target_include_directories(test${CLIENT} PRIVATE ..)
+        add_test(test${CLIENT} test${CLIENT})
+    endif()
+endforeach()
diff --git a/tests/libmemcached-1.0/CMakeLists.txt b/tests/libmemcached-1.0/CMakeLists.txt
new file mode 100644 (file)
index 0000000..72bee1c
--- /dev/null
@@ -0,0 +1,102 @@
+
+add_executable(internals internals.cc string.cc)
+target_link_libraries(internals PRIVATE libtest libmemcachedinternal Threads::Threads)
+target_include_directories(internals PRIVATE ../..)
+add_test(internals internals)
+
+add_executable(sasl
+        basic.cc
+        debug.cc
+        deprecated.cc
+        error_conditions.cc
+        ketama.cc
+        namespace.cc
+        parser.cc
+        pool.cc
+        print.cc
+        replication.cc
+        sasl.cc
+        virtual_buckets.cc
+        callback_counter.cc
+        fetch_all_results.cc
+        generate.cc
+        )
+target_link_libraries(sasl PRIVATE
+        libclient_utilities
+        libhashkit
+        libmemcached
+        libmemcachedutil
+        libtest
+        Threads::Threads
+        )
+target_include_directories(sasl PRIVATE ../..)
+add_test(sasl sasl)
+
+add_executable(atomsmasher atomsmasher.cc)
+add_executable(testplus plus.cpp)
+
+foreach(TEST IN ITEMS atomsmasher testplus)
+    target_sources(${TEST} PRIVATE
+        callback_counter.cc
+        debug.cc
+        fetch_all_results.cc
+        generate.cc
+        print.cc
+        )
+    target_link_libraries(${TEST} PRIVATE
+            libclient_utilities
+            libhashkit
+            libmemcached
+            libmemcachedutil
+            libtest
+            )
+    target_include_directories(${TEST} PRIVATE ../..)
+    add_test(${TEST} ${TEST})
+endforeach()
+
+
+find_library(LIBUUID uuid REQUIRED)
+
+add_executable(testapp all_tests.cc)
+add_executable(testsocket all_tests_socket.cc)
+
+foreach(TEST IN ITEMS testapp testsocket)
+    target_sources(${TEST} PRIVATE
+            basic.cc
+            callback_counter.cc
+            callbacks.cc
+            debug.cc
+            deprecated.cc
+            dump.cc
+            encoding_key.cc
+            error_conditions.cc
+            exist.cc
+            fetch_all_results.cc
+            generate.cc
+            haldenbrand.cc
+            ketama.cc
+            mem_functions.cc
+            memcached_get.cc
+            namespace.cc
+            parser.cc
+            pool.cc
+            print.cc
+            replication.cc
+            server_add.cc
+            setup_and_teardowns.cc
+            stat.cc
+            touch.cc
+            virtual_buckets.cc
+            )
+    target_link_libraries(${TEST} PRIVATE
+            libclient_utilities
+            libhashkit
+            libmemcached
+            libmemcachedutil
+            libtest
+            Threads::Threads
+            ${LIBUUID}
+            )
+    target_include_directories(${TEST} PRIVATE ../..)
+    add_test(${TEST} ${TEST})
+endforeach()
index a471d89a5ab63e96024edf86599df527a874144a..37471773463f03b6060849f440039d984f4a7e21 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <mem_config.h>
 #include <libtest/test.hpp>
-
+#include "libmemcached-1.0/memcached.h"
 #include "tests/basic.h"
 #include "tests/debug.h"
 #include "tests/deprecated.h"
index 8321754d192e5c375deeac4c93747d710f8accb7..fc3aa6664c5136994765c24f0568c58d5e1a37f5 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <mem_config.h>
 #include <libtest/test.hpp>
-
+#include "libmemcached-1.0/memcached.h"
 #include "tests/basic.h"
 #include "tests/debug.h"
 #include "tests/deprecated.h"
index 468ae8467571d04d84e962d4bbb214909af09803..a3f43de205f19d92bd9b6a54acafc5d7bf6015f5 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <mem_config.h>
 #include <libtest/test.hpp>
-
+#include <libmemcached-1.0/memcached.h>
 #include "tests/libmemcached-1.0/callback_counter.h"
 
 memcached_return_t callback_counter(const memcached_st*, memcached_result_st*, void *context)
index 13d1b468766ce250eeb1e6b85aa6aa0a41df53ef..89eb75f7b3e39aec4fb4d9a83a366e9465e1c06d 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <mem_config.h>
 #include <libtest/test.hpp>
-
+#include "libmemcached-1.0/memcached.h"
 #include <tests/callbacks.h>
 
 using namespace libtest;
index 37495b0a874776bf1f36e20fb6fff38623ccd5bb..912785d832417521f162d0cf072360e900a50a0a 100644 (file)
@@ -36,7 +36,7 @@
 
 #include <mem_config.h>
 #include <libtest/test.hpp>
-
+#include "libmemcached-1.0/memcached.h"
 #include <tests/exist.h>
 
 using namespace libtest;
index aaad9eddba62870f2b08e6aeabc5ec410bd27ee2..b753213483a957d615119ccaa500ce2bcbfcefdd 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <mem_config.h>
 #include <libtest/test.hpp>
-
+#include <libmemcached-1.0/memcached.h>
 #include <tests/libmemcached-1.0/fetch_all_results.h>
 
 test_return_t fetch_all_results(memcached_st *memc, unsigned int &keys_returned, memcached_return_t& rc)
index cdc476abca3e43e596206e410c000914e36d663a..8e9f6cc4d1ad91348b62d0dc793e8118bc95d9c8 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <mem_config.h>
 #include <libtest/test.hpp>
-
+#include "libmemcached-1.0/memcached.h"
 #include "tests/libmemcached-1.0/haldenbrand.h"
 #include "tests/libmemcached-1.0/fetch_all_results.h"