public
Description: This is where my memcached work lives before svn munges the changes.
Homepage: http://www.danga.com/memcached/
Clone URL: git://github.com/dustin/memcached.git
Allow running tests in a build directory different from source directory. 
(Tomash Brechko tomash.brechko@gmail.com)


git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@641 
b0b603af-a30f-0410-a34e-baf09ae79d0b
dormando (author)
Fri Nov 16 01:13:41 -0800 2007
commit  37c5dc125f3adcf9a04710e0521d6dd17998b32a
tree    56bb965fb5a0ed0e702c8616399fe4ff7408faa6
parent  a1addb5764d6acdb8f39eacf36ec52a89fb10c2a
...
11
12
13
14
 
15
16
17
...
11
12
13
 
14
15
16
17
0
@@ -11,7 +11,7 @@ DIST_DIRS = scripts
0
 EXTRA_DIST = doc scripts TODO t memcached.spec
0
 
0
 test:  memcached-debug
0
- prove t
0
+ prove $(srcdir)/t
0
 
0
 dist-hook:
0
   rm -rf $(distdir)/doc/.svn/
...
3
4
5
6
7
8
9
 
 
 
 
 
 
10
11
12
...
131
132
133
134
 
135
136
137
...
149
150
151
152
 
153
154
155
...
3
4
5
 
6
7
8
9
10
11
12
13
14
15
16
17
...
136
137
138
 
139
140
141
142
...
154
155
156
 
157
158
159
160
0
@@ -3,10 +3,15 @@ use strict;
0
 use IO::Socket::INET;
0
 use IO::Socket::UNIX;
0
 use Exporter 'import';
0
-use FindBin qw($Bin);
0
 use Carp qw(croak);
0
 use vars qw(@EXPORT);
0
 
0
+# Instead of doing the substitution with Autoconf, we assume that
0
+# cwd == builddir.
0
+use Cwd;
0
+my $builddir = getcwd;
0
+
0
+
0
 @EXPORT = qw(new_memcached sleep mem_get_is mem_gets mem_gets_is mem_stats free_port);
0
 
0
 sub sleep {
0
@@ -131,7 +136,7 @@ sub free_port {
0
 }
0
 
0
 sub supports_udp {
0
- my $output = `$Bin/../memcached-debug -h`;
0
+ my $output = `$builddir/memcached-debug -h`;
0
     return 0 if $output =~ /^memcached 1\.1\./;
0
     return 1;
0
 }
0
@@ -149,7 +154,7 @@ sub new_memcached {
0
     }
0
     my $childpid = fork();
0
 
0
- my $exe = "$Bin/../memcached-debug";
0
+ my $exe = "$builddir/memcached-debug";
0
     croak("memcached binary doesn't exist. Haven't run 'make' ?\n") unless -e $exe;
0
     croak("memcached binary not executable\n") unless -x _;
0
 

Comments

    No one has commented yet.