comparison t/gunzip-memcached.t @ 7:9158103f8571 0.1

Gunzip: fix tests for repcached and memcached 1.2.7+.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 28 Dec 2009 14:45:12 +0000
parents 45e54370c2d0
children
comparison
equal deleted inserted replaced
6:45e54370c2d0 7:9158103f8571
55 } 55 }
56 } 56 }
57 57
58 EOF 58 EOF
59 59
60 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081'); 60 my $memhelp = `memcached -h`;
61 my @memopts = ();
62
63 if ($memhelp =~ /repcached/) {
64 # repcached patch adds additional listen socket
65 push @memopts, '-X', '8082';
66 }
67 if ($memhelp =~ /-U/) {
68 # UDP port is on by default in memcached 1.2.7+
69 push @memopts, '-U', '0';
70 }
71
72 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081', @memopts);
61 73
62 eval { 74 eval {
63 open OLDERR, ">&", \*STDERR; close STDERR; 75 open OLDERR, ">&", \*STDERR; close STDERR;
64 $t->run(); 76 $t->run();
65 open STDERR, ">&", \*OLDERR; 77 open STDERR, ">&", \*OLDERR;