selftest: Allow using ldb* utilities from system.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 27 Nov 2010 02:03:50 +0000 (03:03 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 27 Nov 2010 02:48:20 +0000 (03:48 +0100)
selftest/target/Samba4.pm

index 3e42d034fa9c02c1a5274c2e9fc4cec2bfa01e8e..12414f0307498f49ca19cc4da955e729120aad9c 100644 (file)
@@ -9,6 +9,7 @@ use strict;
 use Cwd qw(abs_path);
 use FindBin qw($RealBin);
 use POSIX;
+use SocketWrapper;
 
 sub new($$$$$) {
        my ($classname, $bindir, $ldap, $setupdir, $exeext) = @_;
@@ -27,7 +28,10 @@ sub new($$$$$) {
 sub bindir_path($$) {
        my ($self, $path) = @_;
 
-       return "$self->{bindir}/$path$self->{exeext}";
+       my $valpath = "$self->{bindir}/$path$self->{exeext}";
+
+       return $valpath if (-f $valpath);
+       return $path;
 }
 
 sub openldap_start($$$) {