From 6f6533aa81791d40b37a9e715c7b7669cc92a1c9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 21 Jan 2009 10:14:29 +0100 Subject: selftest: add --exeext parameter metze --- selftest/selftest.pl | 9 ++++++++- selftest/target/Samba4.pm | 10 ++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'selftest') diff --git a/selftest/selftest.pl b/selftest/selftest.pl index fd0b85c9b0..6f0883c585 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -13,7 +13,7 @@ selftest - Samba test runner selftest --help -selftest [--srcdir=DIR] [--builddir=DIR] [--target=samba4|samba3|win|kvm] [--socket-wrapper] [--quick] [--exclude=FILE] [--include=FILE] [--one] [--prefix=prefix] [--immediate] [--testlist=FILE] [TESTS] +selftest [--srcdir=DIR] [--builddir=DIR] [--exeext=EXT][--target=samba4|samba3|win|kvm] [--socket-wrapper] [--quick] [--exclude=FILE] [--include=FILE] [--one] [--prefix=prefix] [--immediate] [--testlist=FILE] [TESTS] =head1 DESCRIPTION @@ -35,6 +35,10 @@ Source directory. Build directory. +=item I<--exeext=EXT> + +Executable extention + =item I<--prefix=DIR> Change directory to run tests in. Default is 'st'. @@ -156,6 +160,7 @@ my @testlists = (); my $srcdir = "."; my $builddir = "."; +my $exeext = ""; my $prefix = "./st"; my @expected_failures = (); @@ -294,6 +299,7 @@ Paths: --prefix=DIR prefix to run tests in [st] --srcdir=DIR source directory [.] --builddir=DIR output directory [.] + --exeext=EXT executable extention [] Target Specific: --socket-wrapper-pcap save traffic to pcap directories @@ -334,6 +340,7 @@ my $result = GetOptions ( 'include=s' => \@opt_include, 'srcdir=s' => \$srcdir, 'builddir=s' => \$builddir, + 'exeext=s' => \$exeext, 'verbose' => \$opt_verbose, 'testenv' => \$opt_testenv, 'ldap:s' => \$ldap, diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index bb4f39dd0c..83f62d45ec 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -10,13 +10,15 @@ use Cwd qw(abs_path); use FindBin qw($RealBin); use POSIX; -sub new($$$$) { - my ($classname, $bindir, $ldap, $setupdir) = @_; +sub new($$$$$) { + my ($classname, $bindir, $ldap, $setupdir, $exeext) = @_; + $exeext = "" unless defined($exeext); my $self = { vars => {}, ldap => $ldap, bindir => $bindir, - setupdir => $setupdir + setupdir => $setupdir, + exeext => $exeext }; bless $self; return $self; @@ -25,7 +27,7 @@ sub new($$$$) { sub bindir_path($$) { my ($self, $path) = @_; - return "$self->{bindir}/$path"; + return "$self->{bindir}/$path$self->{exeext}"; } sub openldap_start($$$) { -- cgit