summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authorTharanga Gamaethige <tgamaethige@netflix.com>2019-10-21 16:17:02 -0700
committerdormando <dormando@rydia.net>2020-01-21 11:14:48 -0800
commit792e10ac05445fdf1bf247b61d24b88d25f7799b (patch)
tree3af40ebab9025509adf6e8f497245c3bdbfa9f74 /t/lib
parent8d8e3cd48a42b8c166c6221e7ef7ee0b9d410be6 (diff)
downloadmemcached-792e10ac05445fdf1bf247b61d24b88d25f7799b.tar.gz
adding missing defaults to the --help output
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/MemcachedTest.pm18
1 files changed, 14 insertions, 4 deletions
diff --git a/t/lib/MemcachedTest.pm b/t/lib/MemcachedTest.pm
index 8cf313e..ad3402a 100644
--- a/t/lib/MemcachedTest.pm
+++ b/t/lib/MemcachedTest.pm
@@ -15,7 +15,7 @@ my @unixsockets = ();
@EXPORT = qw(new_memcached sleep mem_get_is mem_gets mem_gets_is mem_stats
supports_sasl free_port supports_drop_priv supports_extstore
- wait_ext_flush supports_tls enabled_tls_testing);
+ wait_ext_flush supports_tls enabled_tls_testing run_help);
use constant MAX_READ_WRITE_SIZE => 16384;
use constant SRV_CRT => "server_crt.pem";
@@ -223,6 +223,18 @@ sub supports_drop_priv {
return 0;
}
+sub get_memcached_exe {
+ my $exe = "$builddir/memcached-debug";
+ croak("memcached binary doesn't exist. Haven't run 'make' ?\n") unless -e $exe;
+ croak("memcached binary not executable\n") unless -x _;
+ return $exe;
+}
+
+sub run_help {
+ my $exe = get_memcached_exe();
+ return system("$exe -h");
+}
+
sub new_memcached {
my ($args, $passed_port) = @_;
my $port = $passed_port;
@@ -277,9 +289,7 @@ sub new_memcached {
my $childpid = fork();
- my $exe = "$builddir/memcached-debug";
- croak("memcached binary doesn't exist. Haven't run 'make' ?\n") unless -e $exe;
- croak("memcached binary not executable\n") unless -x _;
+ my $exe = get_memcached_exe();
unless ($childpid) {
#print STDERR "RUN: $exe $args\n";