Merge work in current build tree.
authorBrian Aker <brian@tangent.org>
Mon, 29 Apr 2013 15:24:05 +0000 (11:24 -0400)
committerBrian Aker <brian@tangent.org>
Mon, 29 Apr 2013 15:24:05 +0000 (11:24 -0400)
configure.ac
libtest/include.am
libtest/main.cc
libtest/yatl.m4
m4/ax_memcached.m4
tests/include.am

index f562fcd3fa7779ce7da88b82d46e70f085a4bfc7..b0870bbfc490758e6dc20372a07d63550379b03b 100644 (file)
@@ -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])
index 9ef6d0ba88c7951099908877221deae5736c67d4..97991375fe63c342861bde3968655b708605ab66 100644 (file)
@@ -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
index 2ceeac92cf0bdba962a035e4e240a38e4409ab79..46429241f56a264777ff91b973d8de8c5809f00b 100644 (file)
@@ -297,7 +297,6 @@ int main(int argc, char *argv[])
       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())
         {
@@ -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();
 
index 61d1a2f0f4ecbbf3c0619a39025ac36b62d9ffe6..0e88425db8a7b61c92d2df8c937f6ad3de52bef1 100644 (file)
@@ -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
 
index 21067c68d05f6bc2a8406d7d9888e28b244fe86b..160cfe32399e5eaa7f17f535b66faf8391cddba4 100644 (file)
 #  (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=
+               ])
+         ])
index 44fdbfa3404c042bcd7a2a6793b02427f1050690..414b143b393c69039a5f652f81f9e430eb6dc516 100644 (file)
@@ -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