projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Small cleanup for for() to array.
[m6w6/libmemcached]
/
tests
/
include.am
diff --git
a/tests/include.am
b/tests/include.am
index 20b0ee496ae3595ddc3141097decdc6e0867a06a..259da130cfd70f9d475ab0aae161e55c98d7bcbc 100644
(file)
--- a/
tests/include.am
+++ b/
tests/include.am
@@
-4,37
+4,41
@@
TESTS_LDADDS = libmemcached/libmemcached.la
TESTS_LDADDS = libmemcached/libmemcached.la
+VALGRIND_COMMAND= $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes
+
+DEBUG_COMMAND= $(LIBTOOL) --mode=execute gdb
+
if BUILD_LIBMEMCACHEDUTIL
TESTS_LDADDS+= libmemcached/libmemcachedutil.la
endif
EXTRA_DIST+= \
if BUILD_LIBMEMCACHEDUTIL
TESTS_LDADDS+= libmemcached/libmemcachedutil.la
endif
EXTRA_DIST+= \
- tests/r/memcat.res \
- tests/r/memcp.res \
- tests/r/memrm.res \
- tests/r/memslap.res \
- tests/r/memstat.res \
- tests/t/memcat.test \
- tests/t/memcp.test \
- tests/t/memrm.test \
- tests/t/memslap.test \
- tests/t/memstat.test
+
tests/r/memcat.res \
+
tests/r/memcp.res \
+
tests/r/memrm.res \
+
tests/r/memslap.res \
+
tests/r/memstat.res \
+
tests/t/memcat.test \
+
tests/t/memcp.test \
+
tests/t/memrm.test \
+
tests/t/memslap.test \
+
tests/t/memstat.test
noinst_HEADERS+= \
noinst_HEADERS+= \
- tests/hash_results.h \
- tests/ketama_test_cases.h \
- tests/ketama_test_cases_spy.h \
- tests/libmemcached_world.h \
- tests/server.h \
- tests/test.h
+
tests/hash_results.h \
+
tests/ketama_test_cases.h \
+
tests/ketama_test_cases_spy.h \
+
tests/libmemcached_world.h \
+
tests/server.h \
+
tests/test.h
noinst_PROGRAMS+= \
noinst_PROGRAMS+= \
- tests/atomsmasher \
- tests/startservers \
- tests/testapp \
- tests/testhashkit \
- tests/testplus \
- tests/udptest
+
tests/atomsmasher \
+
tests/startservers \
+
tests/testapp \
+
tests/testhashkit \
+
tests/testplus \
+
tests/udptest
noinst_LTLIBRARIES+= tests/libserver.la
tests_libserver_la_SOURCES= tests/server.c
noinst_LTLIBRARIES+= tests/libserver.la
tests_libserver_la_SOURCES= tests/server.c
@@
-43,11
+47,12
@@
noinst_LTLIBRARIES+= tests/libtest.la
tests_libtest_la_SOURCES= tests/test.c
tests_testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
tests_libtest_la_SOURCES= tests/test.c
tests_testapp_CFLAGS= $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING)
-tests_testapp_SOURCES= tests/
function
.c
+tests_testapp_SOURCES= tests/
mem_functions
.c
tests_testapp_LDADD= \
clients/libgenexec.la \
tests/libserver.la \
tests/libtest.la \
tests_testapp_LDADD= \
clients/libgenexec.la \
tests/libserver.la \
tests/libtest.la \
+ libmemcached/libmemcachedinternal.la \
$(TESTS_LDADDS)
tests_testapp_DEPENDENCIES= $(tests_testapp_LDADD)
$(TESTS_LDADDS)
tests_testapp_DEPENDENCIES= $(tests_testapp_LDADD)
@@
-82,12
+87,11
@@
client-record:
sh tests/t/memslap.test > tests/r/memslap.res
sh tests/t/memstat.test > tests/r/memstat.res
sh tests/t/memslap.test > tests/r/memslap.res
sh tests/t/memstat.test > tests/r/memstat.res
-test: test
s/testapp
tests/testplus library_test memcapable libmhashkit_test
+test: test
-docs
tests/testplus library_test memcapable libmhashkit_test
echo "Tests completed"
echo "Tests completed"
-library_test:
+library_test:
tests/testapp
tests/testapp
tests/testapp
-# tests/testplus
libmhashkit_test: libhashkit
tests/testhashkit
libmhashkit_test: libhashkit
tests/testhashkit
@@
-115,16
+119,31
@@
clients:
cat tests/Xumemc.pid | xargs kill
rm tests/Xumemc.pid
cat tests/Xumemc.pid | xargs kill
rm tests/Xumemc.pid
+MEM_COMMAND= tests/testapp $(COLLECTION) $(SUITE)
+
+HASH_COMMAND= tests/testhashkit $(COLLECTION) $(SUITE)
+
+test-mem:
+ $(MEM_COMMAND)
+
+test-hash:
+ $(HASH_COMMAND)
+
gdb-mem:
gdb-mem:
- $(
LIBTOOL) --mode=execute gdb tests/testapp
+ $(
DEBUG_COMMAND) $(MEM_COMMAND)
gdb-hash:
gdb-hash:
- $(LIBTOOL) --mode=execute gdb tests/testhashkit
+ $(DEBUG_COMMAND) $(HASH_COMMAND)
+
+valgrind-mem:
+ $(VALGRIND_COMMAND) $(MEM_COMMAND)
+
+valgrind-hash:
+ $(VALGRIND_COMMAND) $(HASH_COMMAND)
PHONY += valgrind
PHONY += valgrind
-valgrind:
- $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes tests/testapp
+valgrind: tests/testapp tests/testhashkit valgrind-mem valgrind-hash
PHONY += cachegrind
CLEANFILES += tests/cachegrind.out
PHONY += cachegrind
CLEANFILES += tests/cachegrind.out