summaryrefslogtreecommitdiff
path: root/t/binary-sasl.t
diff options
context:
space:
mode:
Diffstat (limited to 't/binary-sasl.t')
-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;