summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Sallings <dustin@spy.net>2012-01-28 00:03:50 -0800
committerDustin Sallings <dustin@spy.net>2012-01-28 00:04:48 -0800
commita2ef6b475a9171e49c0efc9ddd12677b4db52721 (patch)
treeeb152f671602807d69d9f7aa2074e998957e48c8
parentb0a858ce63817f1360428674630307c4568b614c (diff)
downloadmemcached-a2ef6b475a9171e49c0efc9ddd12677b4db52721.tar.gz
Look around for saslpasswd2 (typically not in the user's path).
-rwxr-xr-xt/binary-sasl.t17
1 files changed, 16 insertions, 1 deletions
diff --git a/t/binary-sasl.t b/t/binary-sasl.t
index 56d05dc..cc55044 100755
--- a/t/binary-sasl.t
+++ b/t/binary-sasl.t
@@ -172,7 +172,22 @@ $empty->('x');
# Build the auth DB for testing.
my $sasldb = '/tmp/test-memcached.sasldb';
unlink $sasldb;
-system("echo testpass | saslpasswd2 -a memcached -c -p testuser");
+
+my $saslpasswd_path;
+for my $dir (split(/:/, $ENV{PATH}),
+ "/usr/bin",
+ "/usr/sbin",
+ "/usr/local/bin",
+ "/usr/local/sbin",
+ ) {
+ my $exe = $dir . '/saslpasswd2';
+ if (-x $exe) {
+ $saslpasswd_path = $exe;
+ last;
+ }
+}
+
+system("echo testpass | $saslpasswd_path -a memcached -c -p testuser");
$mc = MC::Client->new;