summaryrefslogtreecommitdiff
path: root/selftest/selftest.pl
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-04-27 11:19:20 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-04-27 11:22:07 +1000
commit2a9a9454e8dc27e2da49bd513c1f8b3bad76bd25 (patch)
tree627f942d4f8cc0ee906c0e498f44724f5d1b3df7 /selftest/selftest.pl
parente04bab4a19658009e53949b814a58d177966a9cd (diff)
downloadsamba-2a9a9454e8dc27e2da49bd513c1f8b3bad76bd25.tar.gz
samba-2a9a9454e8dc27e2da49bd513c1f8b3bad76bd25.tar.bz2
samba-2a9a9454e8dc27e2da49bd513c1f8b3bad76bd25.zip
selftest: Make bindir_path much less complex
There is no need to pass it as a function pointer, just put it in 'Samba.pm'. Andrew Bartlett
Diffstat (limited to 'selftest/selftest.pl')
-rwxr-xr-xselftest/selftest.pl19
1 files changed, 3 insertions, 16 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 9f937f1655..c45ccb352e 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -468,19 +468,6 @@ if ($opt_binary_mapping) {
$ENV{BINARY_MAPPING} = $opt_binary_mapping;
-sub bindir_path($$) {
- my ($self, $path) = @_;
-
- if (defined($self->{binary_mapping}->{$path})) {
- $path = $self->{binary_mapping}->{$path};
- }
-
- my $valpath = "$self->{bindir}/$path$self->{exeext}";
-
- return $valpath if (-f $valpath);
- return $path;
-}
-
# After this many seconds, the server will self-terminate. All tests
# must terminate in this time, and testenv will only stay alive this
# long
@@ -496,18 +483,18 @@ if ($opt_target eq "samba") {
}
$testenv_default = "all";
require target::Samba;
- $target = new Samba($bindir, \%binary_mapping, \&bindir_path, $ldap, $srcdir, $exeext, $server_maxtime);
+ $target = new Samba($bindir, \%binary_mapping, $ldap, $srcdir, $exeext, $server_maxtime);
} elsif ($opt_target eq "samba4") {
$testenv_default = "all";
require target::Samba4;
- $target = new Samba4($bindir, \%binary_mapping, \&bindir_path, $ldap, $srcdir, $exeext, $server_maxtime);
+ $target = new Samba4($bindir, \%binary_mapping, $ldap, $srcdir, $exeext, $server_maxtime);
} elsif ($opt_target eq "samba3") {
if ($opt_socket_wrapper and `$bindir/smbd -b | grep SOCKET_WRAPPER` eq "") {
die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting....");
}
$testenv_default = "member";
require target::Samba3;
- $target = new Samba3($bindir, \%binary_mapping, \&bindir_path, $srcdir_abs, $exeext, $server_maxtime);
+ $target = new Samba3($bindir, \%binary_mapping, $srcdir_abs, $exeext, $server_maxtime);
} elsif ($opt_target eq "win") {
die("Windows tests will not run with socket wrapper enabled.")
if ($opt_socket_wrapper);