From 6c1ce36ec97525774aaba294f48fbd6fab15a80e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 22 Feb 2011 11:56:18 +1100 Subject: [PATCH] selftest pass in srcdir into Samba3 target module --- selftest/selftest.pl | 2 +- selftest/target/Samba3.pm | 12 +++++++----- source3/selftest/s3-selftest.sh | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 4b42ec4801b..9db3f21bb87 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 4d60a520027..b46a2df8d7b 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 67b2de94073..d2dad87ec2d 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} -- 2.34.1