[memcached] bradfitz, r381: to stay in sync with 1.1.x test library.
commits at code.sixapart.com
commits at code.sixapart.com
Sat Sep 9 17:16:02 UTC 2006
to stay in sync with 1.1.x test library.
U trunk/server/t/lib/MemcachedTest.pm
Modified: trunk/server/t/lib/MemcachedTest.pm
===================================================================
--- trunk/server/t/lib/MemcachedTest.pm 2006-09-09 17:13:40 UTC (rev 380)
+++ trunk/server/t/lib/MemcachedTest.pm 2006-09-09 17:16:02 UTC (rev 381)
@@ -71,11 +71,20 @@
return $port;
}
+sub supports_udp {
+ my $output = `$Bin/../memcached-debug -h`;
+ return 0 if $output =~ /^memcached 1\.1\./;
+ return 1;
+}
+
sub new_memcached {
my $args = shift || "";
my $port = free_port();
my $udpport = free_port("udp");
- $args .= " -p $port -U $udpport";
+ $args .= " -p $port";
+ if (supports_udp()) {
+ $args .= " -U $udpport";
+ }
if ($< == 0) {
$args .= " -u root";
}
More information about the memcached-commits
mailing list