From: Monty Taylor Date: Fri, 18 Dec 2009 01:25:43 +0000 (-0800) Subject: Merged from build. X-Git-Tag: 0.37~57^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=8fd8f655540e3d6aa0b0a3eb0f4f7df1be2e6542;p=m6w6%2Flibmemcached Merged from build. --- 8fd8f655540e3d6aa0b0a3eb0f4f7df1be2e6542 diff --cc Makefile.am index 0bfe7ccd,868ea873..09db5e94 --- a/Makefile.am +++ b/Makefile.am @@@ -1,28 -1,7 +1,28 @@@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = docs libmemcached libhashkit support clients tests example -EXTRA_dist = README.FIRST +# includes append to these: +SUFFIXES = +PHONY = +TESTS = +CLEANFILES = +bin_PROGRAMS = +noinst_HEADERS = +lib_LTLIBRARIES = +noinst_LTLIBRARIES = +noinst_PROGRAMS = +pkginclude_HEADERS = +nobase_pkginclude_HEADERS = +EXTRA_HEADERS = +BUILT_SOURCES= +EXTRA_DIST = README.FIRST + - SUBDIRS = docs ++SUBDIRS = docs libhashkit + +include libmemcached/include.am +include clients/include.am +include tests/include.am +include example/include.am +include support/include.am check-local: test-no-outputdiff diff --cc configure.ac index de62e1ea,f5e1e574..342f92de --- a/configure.ac +++ b/configure.ac @@@ -46,8 -49,14 +49,9 @@@ AS_IF([test "x$ac_cv_header_atomic_h" AC_CONFIG_FILES([ Makefile - clients/Makefile - tests/Makefile docs/Makefile - example/Makefile - libmemcached/Makefile libmemcached/memcached_configure.h + libhashkit/Makefile - support/Makefile support/libmemcached.pc support/libmemcached.spec support/libmemcached-fc.spec diff --cc libmemcached/include.am index 12e6be35,00000000..dc70562f mode 100644,000000..100644 --- a/libmemcached/include.am +++ b/libmemcached/include.am @@@ -1,140 -1,0 +1,141 @@@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +EXTRA_DIST+= \ + libmemcached/libmemcached_probes.d \ + libmemcached/memcached/README.txt \ + libmemcached/memcached_configure.h.in + + +noinst_HEADERS+= \ + libmemcached/byteorder.h \ + libmemcached/libmemcached_probes.h \ + libmemcached/io.h \ + libmemcached/internal.h \ + libmemcached/common.h \ + libmemcached/memcached/protocol_binary.h \ + libmemcached/protocol/common.h \ + libmemcached/protocol/ascii_handler.h \ + libmemcached/protocol/binary_handler.h + +nobase_pkginclude_HEADERS+= \ + libmemcached/behavior.h \ + libmemcached/callback.h \ + libmemcached/constants.h \ ++ libmemcached/dump.h \ + libmemcached/exception.hpp \ + libmemcached/get.h \ + libmemcached/memcached.h \ + libmemcached/memcached.hpp \ + libmemcached/memcached_configure.h \ + libmemcached/protocol/cache.h \ + libmemcached/protocol/callback.h \ + libmemcached/protocol_handler.h \ + libmemcached/result.h \ + libmemcached/server.h \ + libmemcached/storage.h \ + libmemcached/string.h \ + libmemcached/types.h \ + libmemcached/visibility.h \ + libmemcached/watchpoint.h + + + +lib_LTLIBRARIES+= libmemcached/libmemcachedprotocol.la +libmemcached_libmemcachedprotocol_la_SOURCES = \ + libmemcached/protocol/ascii_handler.c \ + libmemcached/protocol/binary_handler.c \ + libmemcached/protocol/cache.c \ + libmemcached/protocol/pedantic.c \ + libmemcached/protocol/protocol_handler.c + +libmemcached_libmemcachedprotocol_la_LDFLAGS= ${AM_LDFLAGS} -version-info 0:0:0 + +noinst_LTLIBRARIES+= libmemcached/libmemcachedcallbacks.la +libmemcached_libmemcachedcallbacks_la_CFLAGS = ${AM_CFLAGS} ${NO_STRICT_ALIASING} +libmemcached_libmemcachedcallbacks_la_SOURCES = libmemcached/callback.c + +lib_LTLIBRARIES+= libmemcached/libmemcached.la +libmemcached_libmemcached_la_CFLAGS= ${AM_CFLAGS} ${NO_CONVERSION} +libmemcached_libmemcached_la_SOURCES = \ + libmemcached/allocators.c \ + libmemcached/analyze.c \ + libmemcached/auto.c \ + libmemcached/behavior.c \ + libmemcached/connect.c \ + libmemcached/crc.c \ + libmemcached/delete.c \ + libmemcached/do.c \ + libmemcached/dump.c \ + libmemcached/fetch.c \ + libmemcached/flush.c \ + libmemcached/flush_buffers.c \ + libmemcached/get.c \ + libmemcached/hash.c \ + libmemcached/hosts.c \ + libmemcached/io.c \ + libmemcached/jenkins_hash.c \ + libmemcached/key.c \ + libmemcached/md5.c \ + libmemcached/memcached.c \ + libmemcached/murmur_hash.c \ + libmemcached/parse.c \ + libmemcached/purge.c \ + libmemcached/quit.c \ + libmemcached/response.c \ + libmemcached/result.c \ + libmemcached/server.c \ + libmemcached/stats.c \ + libmemcached/storage.c \ + libmemcached/strerror.c \ + libmemcached/string.c \ + libmemcached/verbosity.c \ + libmemcached/version.c + + +if INCLUDE_HSIEH_SRC +libmemcached_libmemcached_la_SOURCES += libmemcached/hsieh_hash.c +endif + +libmemcached_libmemcached_la_DEPENDENCIES= libmemcached/libmemcachedcallbacks.la +libmemcached_libmemcached_la_LIBADD= $(LIBM) libmemcached/libmemcachedcallbacks.la +libmemcached_libmemcached_la_LDFLAGS= ${AM_LDFLAGS} -version-info 3:0:0 + +if BUILD_LIBMEMCACHEDUTIL +pkginclude_HEADERS+= libmemcached/memcached_util.h libmemcached/pool.h +lib_LTLIBRARIES+= libmemcached/libmemcachedutil.la +endif + +libmemcached_libmemcachedutil_la_SOURCES= libmemcached/util/pool.c +libmemcached_libmemcachedutil_la_LIBADD= libmemcached/libmemcached.la +libmemcached_libmemcachedutil_la_LDFLAGS= ${AM_LDFLAGS} -version-info 0:0:0 +libmemcached_libmemcachedutil_la_DEPENDENCIES= libmemcached/libmemcached.la + +if BUILD_BYTEORDER +noinst_LTLIBRARIES += libmemcached/libbyteorder.la +libmemcached_libbyteorder_la_SOURCES= libmemcached/byteorder.c +libmemcached_libmemcached_la_LIBADD += libmemcached/libbyteorder.la +libmemcached_libmemcached_la_DEPENDENCIES+= libmemcached/libbyteorder.la +libmemcached_libmemcachedprotocol_la_LIBADD=libmemcached/libbyteorder.la +libmemcached_libmemcachedprotocol_la_DEPENDENCIES=libmemcached/libbyteorder.la +endif + +if HAVE_DTRACE +BUILT_SOURCES+= libmemcached/dtrace_probes.h +libmemcached_libmemcached_la_SOURCES += libmemcached/libmemcached_probes.d +endif + +if DTRACE_NEEDS_OBJECTS +libmemcached_libmemcached_la_DEPENDENCIES += libmemcached/libmemcached_probes.o +endif + +SUFFIXES+= .d + +libmemcached/dtrace_probes.h: libmemcached/libmemcached_probes.d + $(DTRACE) $(DTRACEFLAGS) -h -o libmemcached/dtrace_probes.h -s libmemcached/libmemcached_probes.d + +libmemcached/libmemcached_probes.o: libmemcached/libmemcached_probes.d $(libmemcached_libmemcached_la_OBJECTS) + $(DTRACE) $(DTRACEFLAGS) -o libmemcached/.libs/libmemcached_probes.o -G -s libmemcached/libmemcached_probes.d `grep '^pic_object' *.lo | cut -f 2 -d\'` + $(DTRACE) $(DTRACEFLAGS) -o libmemcached/libmemcached_probes.o -G -s libmemcached/libmemcached_probes.d `grep non_pic_object *.lo | cut -f 2 -d\' ` + diff --cc tests/include.am index 32f044c9,00000000..ddc2678b mode 100644,000000..100644 --- a/tests/include.am +++ b/tests/include.am @@@ -1,136 -1,0 +1,151 @@@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +TESTS_LDADDS = libmemcached/libmemcached.la + +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 + +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 + +noinst_PROGRAMS+= \ + 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/libtest.la +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_LDADD= \ + clients/libgenexec.la \ + tests/libserver.la \ + tests/libtest.la \ + $(TESTS_LDADDS) + +tests_testplus_SOURCES= tests/plus.cpp +tests_testplus_LDADD= tests/libtest.la tests/libserver.la $(TESTS_LDADDS) + +tests_udptest_SOURCES= tests/udp.c +tests_udptest_LDADD= tests/libtest.la tests/libserver.la $(TESTS_LDADDS) + +tests_atomsmasher_SOURCES= tests/atomsmasher.c +tests_atomsmasher_LDADD= \ + clients/libgenexec.la \ + tests/libserver.la \ + tests/libtest.la \ + $(TESTS_LDADDS) + +tests_startservers_SOURCES= tests/start.c +tests_startservers_LDADD= tests/libserver.la $(TESTS_LDADDS) + ++tests_testhashkit_SOURCES = tests/hashkit_functions.c ++tests_testhashkit_LDADD = tests/libtest.la libhashkit/libhashkit.la ++tests_testhashkit_DEPENDENCIES = libhashkit ++ +client-record: + sh tests/t/memcat.test > tests/r/memcat.res + sh tests/t/memcp.test > tests/r/memcp.res + sh tests/t/memrm.test > tests/r/memrm.res + sh tests/t/memslap.test > tests/r/memslap.res + sh tests/t/memstat.test > tests/r/memstat.res + - test: tests/testapp tests/testplus library_test memcapable ++test: tests/testapp tests/testplus library_test memcapable libmhashkit_test + echo "Tests completed" + +library_test: + tests/testapp +# tests/testplus + ++libmhashkit_test: libhashkit ++ tests/testhashkit ++ +memcapable: clients/memcapable + @MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 + @clients/memcapable -p 12555 || echo "Your memcached server does not support all commands" + @cat tests/Xumemc.pid | xargs kill || echo "Failed to kill memcached server" + @rm tests/Xumemc.pid + +PHONY += clients +clients: + @MEMC_BINARY@ -d -P `pwd`/tests/Xumemc.pid -p 12555 + export MEMCACHED_SERVERS="localhost:12555" + sh tests/t/memcat.test > tests/r/memcat.cmp + diff tests/r/memcat.res tests/r/memcat.cmp + sh tests/t/memcp.test > tests/r/memcp.cmp + diff tests/r/memcp.res tests/r/memcp.cmp + sh tests/t/memrm.test > tests/r/memrm.cmp + diff tests/r/memrm.res tests/r/memrm.cmp + sh tests/t/memslap.test > tests/r/memslap.cmp + diff tests/r/memslap.res tests/r/memslap.cmp + sh tests/t/memstat.test > tests/r/memstat.cmp + diff tests/r/memstat.res tests/r/memstat.cmp + cat tests/Xumemc.pid | xargs kill + rm tests/Xumemc.pid + ++gdb-mem: ++ $(LIBTOOL) --mode=execute gdb tests/testapp ++ ++gdb-hash: ++ $(LIBTOOL) --mode=execute gdb tests/testhashkit ++ ++ +PHONY += valgrind +valgrind: + $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes tests/testapp + +PHONY += cachegrind +CLEANFILES += tests/cachegrind.out +cachegrind: + rm -f tests/cachegrind.out.* + $(LIBTOOL) --mode=execute valgrind --tool=cachegrind --cachegrind-out-file=tests/cachegrind.out.%p --branch-sim=yes tests/testapp + cg_annotate tests/cachegrind.out.* --auto=yes > tests/cachegrind.out + +PHONY += callgrind +CLEANFILES += tests/callgrind.out +callgrind: + rm -f tests/callgrind.out.* + $(LIBTOOL) --mode=execute valgrind --tool=callgrind --callgrind-out-file=tests/callgrind.out.%p tests/testapp + callgrind_annotate tests/callgrind.out.* --auto=yes > tests/callgrind.out + +PHONY += helgrind +CLEANFILES+= helgrind.out.* +helgrind: + rm -f helgrind.out.* + $(LIBTOOL) --mode=execute valgrind --tool=helgrind tests/testapp + +PHONY += helgrind-slap +helgrind-slap: + $(LIBTOOL) --mode=execute valgrind --tool=helgrind clients/memslap --server=localhost --concurrency=30 + +test-no-outputdiff: test + +hudson-valgrind: + $(LIBTOOL) --mode=execute valgrind --leak-check=yes --show-reachable=yes --log-file=tests/valgrind.out tests/testapp