Merge lp:~trond-norbye/gearmand/bug_394169 into lp:gearmand/1.0

Proposed by Trond Norbye
Status: Merged
Merged at revision: not available
Proposed branch: lp:~trond-norbye/gearmand/bug_394169
Merge into: lp:gearmand/1.0
Diff against target: None lines
To merge this branch: bzr merge lp:~trond-norbye/gearmand/bug_394169
Reviewer Review Type Date Requested Status
Gearman-developers Pending
Review via email: mp+8076@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Trond Norbye (trond-norbye) wrote :

make test tries to start the memcached daemon by just executing memcached and expects it to be located in the PATH of the user. On some systems deamons are not installed in the users default path (they are not intended to be started from the command line by the average user), leading to a test failure

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2009-06-21 12:17:46 +0000
3+++ configure.ac 2009-07-01 08:29:17 +0000
4@@ -242,6 +242,9 @@
5
6 AM_CONDITIONAL(HAVE_LIBMEMCACHED, test x$ac_cv_libmemcached = xyes)
7
8+AS_IF([test x$ac_cv_libmemcached = xyes],
9+ [ WITH_MEMCACHED ])
10+
11 AC_CHECK_HEADERS(assert.h errno.h fcntl.h getopt.h netinet/tcp.h pwd.h signal.h)
12 AC_CHECK_HEADERS(stdarg.h stddef.h stdio.h stdlib.h string.h)
13 AC_CHECK_HEADERS(sys/resource.h sys/stat.h)
14
15=== added file 'm4/memcached.m4'
16--- m4/memcached.m4 1970-01-01 00:00:00 +0000
17+++ m4/memcached.m4 2009-07-01 08:29:17 +0000
18@@ -0,0 +1,27 @@
19+AC_DEFUN([WITH_MEMCACHED],
20+ [AC_ARG_WITH([memcached],
21+ [AS_HELP_STRING([--with-memcached],
22+ [Memcached binary to use for make test])],
23+ [ac_cv_with_memcached="$withval"],
24+ [ac_cv_with_memcached=memcached])
25+
26+ # just ignore the user if --without-memcached is passed.. it is
27+ # only used by make test
28+ AS_IF([test "x$withval" = "xno"],
29+ [
30+ ac_cv_with_memcached=memcached
31+ MEMCACHED_BINARY=memcached
32+ ],
33+ [
34+ AS_IF([test -f "$withval"],
35+ [
36+ ac_cv_with_memcached=$withval
37+ MEMCACHED_BINARY=$withval
38+ ],
39+ [
40+ AC_PATH_PROG([MEMCACHED_BINARY], [$ac_cv_with_memcached], "no")
41+ AS_IF([test "x$MEMCACHED_BINARY" = "xno"],
42+ AC_MSG_ERROR(["could not find memcached binary"]))
43+ ])
44+ ])
45+])
46
47=== modified file 'tests/Makefile.am'
48--- tests/Makefile.am 2009-07-01 01:40:21 +0000
49+++ tests/Makefile.am 2009-07-01 08:29:17 +0000
50@@ -7,7 +7,7 @@
51
52 if HAVE_LIBMEMCACHED
53 LIBMEMCACHED_TEST= memcached_test
54-LIBMEMCACHED_SETUP= memcached -d -P /tmp/Xumemc.pid -p 12555
55+LIBMEMCACHED_SETUP= $(MEMCACHED_BINARY) -d -P /tmp/Xumemc.pid -p 12555
56 LIBMEMCACHED_TEARDOWN= cat /tmp/Xumemc.pid | xargs kill
57 LIBMEMCACHED_RM= rm /tmp/Xumemc.pid
58 LIBMEMCACHED_RES= memcached_test.res

Subscribers

People subscribed via source and target branches