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])
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
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
std::auto_ptr<libtest::Framework> frame(new libtest::Framework(signal, binary_name, collection_to_run, wildcard));
// Run create(), bail on error.
- try
{
switch (frame->create())
{
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();
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
# (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=
+ ])
+ ])
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
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