From: Brian Aker Date: Mon, 29 Apr 2013 15:24:05 +0000 (-0400) Subject: Merge work in current build tree. X-Git-Tag: 1.0.18~25^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=7b3833138cda25e0de1ac93cfbaae09a5529b01f;p=awesomized%2Flibmemcached Merge work in current build tree. --- diff --git a/configure.ac b/configure.ac index f562fcd3..b0870bbf 100644 --- a/configure.ac +++ b/configure.ac @@ -117,6 +117,7 @@ AX_PROG_MEMCACHED AX_PROG_SPHINX_BUILD(,[AC_MSG_WARN([sphinx-build version 1.0 or greater is required to build man pages])]) AX_WITH_PROG([LCOV],[lcov]) AX_WITH_PROG([LCOV_GENHTML],[genhtml]) +AC_DEFINE([HAVE_MEMCACHED_SASL_BINARY],[0],[If Memcached binary with sasl support is available]) # Checks for libraries. AC_SEARCH_LIBS([getopt_long],[gnugetopt]) diff --git a/libtest/include.am b/libtest/include.am index 9ef6d0ba..97991375 100644 --- a/libtest/include.am +++ b/libtest/include.am @@ -9,7 +9,7 @@ VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitc SGCHECK_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1 VALGRIND_COMMAND= TESTS_ENVIRONMENT="valgrind" $(VALGRIND_EXEC_COMMAND) HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes -DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --error-exitcode=1 +DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --free-is-write=yes --error-exitcode=1 SGCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1 MASSIF_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=massif GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb @@ -221,6 +221,18 @@ libtest_skiptest_SOURCES= libtest/skiptest.cc check_PROGRAMS+= libtest/skiptest noinst_PROGRAMS+= libtest/skiptest +test-skiptest: libtest/skiptest + @libtest/skiptest + +valgrind-skiptest: libtest/skiptest + @$(VALGRIND_COMMAND) libtest/skiptest + +helgrind-skiptest: libtest/skiptest + @$(HELGRIND_COMMAND) libtest/skiptest + +drd-skiptest: libtest/skiptest + @$(DRD_COMMAND) libtest/skiptest + libtest_wait_SOURCES= libtest_wait_SOURCES+= libtest/wait.cc libtest_wait_SOURCES+= libtest/dream.cc diff --git a/libtest/main.cc b/libtest/main.cc index 2ceeac92..46429241 100644 --- a/libtest/main.cc +++ b/libtest/main.cc @@ -297,7 +297,6 @@ int main(int argc, char *argv[]) std::auto_ptr frame(new libtest::Framework(signal, binary_name, collection_to_run, wildcard)); // Run create(), bail on error. - try { switch (frame->create()) { @@ -305,17 +304,14 @@ int main(int argc, char *argv[]) break; case TEST_SKIPPED: - return EXIT_SKIP; + SKIP("SKIP was returned from framework create()"); + break; case TEST_FAILURE: std::cerr << "Could not call frame->create()" << std::endl; return EXIT_FAILURE; } } - catch (const libtest::__skipped& e) - { - return EXIT_SKIP; - } frame->exec(); diff --git a/libtest/yatl.m4 b/libtest/yatl.m4 index 61d1a2f0..0e88425d 100644 --- a/libtest/yatl.m4 +++ b/libtest/yatl.m4 @@ -7,7 +7,6 @@ AC_SUBST([LIBTEST_VERSION],[1.0]) AC_CONFIG_FILES([libtest/version.h]) m4_include([libtest/m4/mysql.m4]) -AC_DEFINE([HAVE_MEMCACHED_SASL_BINARY],[0],[If Memcached binary with sasl support is available]) YATL_MYSQL diff --git a/m4/ax_memcached.m4 b/m4/ax_memcached.m4 index 21067c68..160cfe32 100644 --- a/m4/ax_memcached.m4 +++ b/m4/ax_memcached.m4 @@ -44,15 +44,26 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#serial 3 +#serial 4 AC_DEFUN([AX_PROG_MEMCACHED], - [AX_WITH_PROG([MEMCACHED_BINARY],[memcached]) - AS_IF([test -f "$ac_cv_path_MEMCACHED_BINARY"], - [AC_DEFINE([HAVE_MEMCACHED_BINARY], [1], [If Memcached binary is available]) - AC_DEFINE_UNQUOTED([MEMCACHED_BINARY],"$ac_cv_path_MEMCACHED_BINARY",[Name of the memcached binary used in make test]) - ax_memcached_version=`$MEMCACHED_BINARY -h | sed 1q | awk '{print \$ 2 }' | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'` - AC_MSG_RESULT([memcached version "$ax_memcached_version"]) - AC_DEFINE_UNQUOTED([MEMCACHED_VERSION],"$ax_memcached_version",[Memcached binary version]) - ]) - ]) + [AX_WITH_PROG([MEMCACHED_BINARY],[memcached],[unknown]) + ax_memcached_success= + AS_IF([test x"$MEMCACHED_BINARY" != xunknown], + [AS_IF([test -x "$MEMCACHED_BINARY"], + [ax_memcached_version=`$MEMCACHED_BINARY -h | sed 1q | awk '{print \$ 2 }' | sed 's|[\-a-z0-9]*$||' | awk -F. '{printf "%d.%d.%d", $[]1, $[]2, $[]3}'` + AS_IF([test -n "$ax_memcached_version"], + [ax_memcached_success='ok' + AC_MSG_RESULT([memcached version "$ax_memcached_version"]) + AC_DEFINE_UNQUOTED([MEMCACHED_VERSION],"$ax_memcached_version",[Memcached binary version])]) + ]) + ]) + + AS_IF([test -n "$ax_memcached_success"], + [AC_DEFINE([HAVE_MEMCACHED_BINARY], [1], [If Memcached binary is available]) + AC_DEFINE_UNQUOTED([MEMCACHED_BINARY],"$MEMCACHED_BINARY",[Name of the memcached binary used in make test]) + ], + [AC_DEFINE([HAVE_MEMCACHED_BINARY], [0], [If Memcached binary is available]) + MEMCACHED_BINARY= + ]) + ]) diff --git a/tests/include.am b/tests/include.am index 44fdbfa3..414b143b 100644 --- a/tests/include.am +++ b/tests/include.am @@ -98,6 +98,9 @@ valgrind-memcapable: tests/memcapable pahole-mem: tests/testapp @$(PAHOLE_COMMAND) tests/testapp +pahole-hash: tests/testhashkit + @$(PAHOLE_COMMAND) tests/testhashkit + gdb-mem: tests/libmemcached-1.0/testapp @$(GDB_COMMAND) tests/libmemcached-1.0/testapp @@ -148,3 +151,9 @@ helgrind-hash: tests/testhashkit helgrind-hashplus: tests/hash_plus @$(HELGRIND_COMMAND) tests/hash_plus + +drd-mem: tests/libmemcached-1.0/testapp + @$(DRD_COMMAND) tests/libmemcached-1.0/testapp + +drd-cycle: tests/cycle + @$(DRD_COMMAND) tests/cycle