summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-02-22 11:56:18 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-02-22 16:20:10 +1100
commit6c1ce36ec97525774aaba294f48fbd6fab15a80e (patch)
tree0767e72ea3ad1e68cb97a39705e15a1e35aaee46
parentb73cfabdf5cc28a91a72df8b64cf57021e08f0b0 (diff)
downloadsamba-6c1ce36ec97525774aaba294f48fbd6fab15a80e.tar.gz
samba-6c1ce36ec97525774aaba294f48fbd6fab15a80e.tar.bz2
samba-6c1ce36ec97525774aaba294f48fbd6fab15a80e.zip
selftest pass in srcdir into Samba3 target module
-rwxr-xr-xselftest/selftest.pl2
-rw-r--r--selftest/target/Samba3.pm12
-rwxr-xr-xsource3/selftest/s3-selftest.sh2
3 files changed, 10 insertions, 6 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 4b42ec4801..9db3f21bb8 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -472,7 +472,7 @@ if ($opt_target eq "samba4") {
}
$testenv_default = "member";
require target::Samba3;
- $target = new Samba3($bindir);
+ $target = new Samba3($bindir, $srcdir_abs);
} elsif ($opt_target eq "win") {
die("Windows tests will not run with socket wrapper enabled.")
if ($opt_socket_wrapper);
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 4d60a52002..b46a2df8d7 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -24,8 +24,10 @@ sub binpath($$)
}
sub new($$) {
- my ($classname, $bindir) = @_;
- my $self = { bindir => $bindir };
+ my ($classname, $bindir, $srcdir) = @_;
+ my $self = { bindir => $bindir,
+ srcdir => $srcdir
+ };
bless $self;
return $self;
}
@@ -475,11 +477,11 @@ sub provision($$$$$$)
my $conffile="$libdir/server.conf";
- my $nss_wrapper_pl = "$ENV{PERL} $RealBin/../lib/nss_wrapper/nss_wrapper.pl";
+ my $nss_wrapper_pl = "$ENV{PERL} $self->{srcdir}/lib/nss_wrapper/nss_wrapper.pl";
my $nss_wrapper_passwd = "$privatedir/passwd";
my $nss_wrapper_group = "$privatedir/group";
- my $mod_printer_pl = "$ENV{PERL} $RealBin/../source3/script/tests/printing/modprinter.pl";
+ my $mod_printer_pl = "$ENV{PERL} $self->{srcdir}/source3/script/tests/printing/modprinter.pl";
my @eventlog_list = ("dns server", "application");
@@ -521,7 +523,7 @@ sub provision($$$$$$)
netbios name = $server
interfaces = $server_ip/8
bind interfaces only = yes
- panic action = $RealBin/gdb_backtrace %d %\$(MAKE_TEST_BINARY)
+ panic action = $self->{srcdir}/selftest/gdb_backtrace %d %\$(MAKE_TEST_BINARY)
workgroup = $domain
diff --git a/source3/selftest/s3-selftest.sh b/source3/selftest/s3-selftest.sh
index 67b2de9407..d2dad87ec2 100755
--- a/source3/selftest/s3-selftest.sh
+++ b/source3/selftest/s3-selftest.sh
@@ -23,6 +23,7 @@ if [ "x${RUN_FROM_BUILD_FARM}" = "xyes" ]; then
--builddir=. --prefix=${SELFTESTPREFIX} --target=samba3 \
--testlist="${PYTHON} ${SOURCEDIR}/selftest/tests.py|" \
--exclude=${SOURCEDIR}/selftest/skip \
+ --srcdir="${SOURCEDIR}/.." \
--socket-wrapper ${TESTS} \
&& touch ${SELFTESTPREFIX}/st_done ) | \
${FILTER_XFAIL} --strip-passed-output
@@ -35,6 +36,7 @@ else
--builddir=. --prefix=${SELFTESTPREFIX} --target=samba3 \
--testlist="${PYTHON} ${SOURCEDIR}/selftest/tests.py|" \
--exclude=${SOURCEDIR}/selftest/skip \
+ --srcdir="${SOURCEDIR}/.." \
--socket-wrapper ${TESTS} \
&& touch ${SELFTESTPREFIX}/st_done ) | \
${FILTER_XFAIL} | ${SUBUNIT_FORMATTER}