Merge in libtest updates.
[awesomized/libmemcached] / libtest / include.am
index 7cda0f9b9fb91c4e744cf3b4a1bc708df101bee6..57d579bad08cbd8b0637cf6cc5ed6e492baffacf 100644 (file)
@@ -9,12 +9,19 @@
 # All paths should be given relative to the root
 # 
 
-LIBUTEST_TMP = ${abs_top_builddir}/tests/var/tmp/
+LIBTEST_TMP = ${abs_top_builddir}/tests/var/tmp/
 
-VALGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --error-exitcode=1 --leak-check=yes --show-reachable=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
-HELGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1  -v
-DRD_COMMAND= $(LIBTOOL) --mode=execute valgrind --tool=drd
-GDB_COMMAND= $(LIBTOOL) --mode=execute gdb -f -x libtest/run.gdb
+LIBTOOL_COMMAND=$(LIBTOOL) --mode=execute
+VALGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --error-exitcode=1 --leak-check=yes --show-reachable=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
+HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 
+DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd
+GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb
+
+export LIBTOOL_COMMAND
+export VALGRIND_COMMAND
+export HELGRIND_COMMAND
+export DRD_COMMAND
+export GDB_COMMAND
 
 EXTRA_DIST+= libtest/run.gdb
 
@@ -24,11 +31,12 @@ CLEANFILES+= \
             tests/var/tmp/*
 
 noinst_HEADERS+= \
+                libtest/blobslap_worker.h \
                 libtest/callbacks.h \
                 libtest/cmdline.h \
                 libtest/collection.h \
-                libtest/comparison.hpp \
                 libtest/common.h \
+                libtest/comparison.hpp \
                 libtest/core.h \
                 libtest/error.h \
                 libtest/failed.h \
@@ -77,34 +85,37 @@ endif
 
 if HAVE_LIBGEARMAN
 LIBTEST_LDADD+= libgearman/libgearman.la
+libtest_libtest_la_SOURCES+= libtest/blobslap_worker.cc
 libtest_libtest_la_SOURCES+= libtest/gearmand.cc
 libtest_libtest_la_SOURCES+= util/instance.cc
+libtest_libtest_la_SOURCES+= util/operation.cc
 endif
 
+libtest_tmp_dir: tests/var/log tests/var/tmp tests/var/run clearn-var
+
 clearn-var:
        @rm -f tests/var/log/*
        @rm -f tests/var/run/*
        @rm -f tests/var/tmp/*
 
+tests/var:
+       @$(mkdir_p) tests/var
 
-tests/var: tests/var/log tests/var/tmp tests/var/run clearn-var
-       $(mkdir_p) tests/var
-
-tests/var/log:
-       $(mkdir_p) tests/var/log
+tests/var/log: tests/var
+       @$(mkdir_p) tests/var/log
 
-tests/var/tmp:
-       $(mkdir_p) tests/var/tmp
+tests/var/tmp: tests/var
+       @$(mkdir_p) tests/var/tmp
 
-tests/var/run:
-       $(mkdir_p) tests/var/run
+tests/var/run: tests/var
+       @$(mkdir_p) tests/var/run
 
 .PHONY+= tests/var
 
 
 libtest_unittest_CFLAGS=
 libtest_unittest_LDADD= ${LIBTEST_LDADD}
-libtest_unittest_DEPENDENCIES= ${LIBTEST_LDADD}
+libtest_unittest_DEPENDENCIES= ${LIBTEST_LDADD} libtest_tmp_dir
 libtest_unittest_SOURCES= libtest/unittest.cc
 check_PROGRAMS+= libtest/unittest
 noinst_PROGRAMS+= libtest/unittest