diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-01 00:36:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:03:21 -0500 |
commit | c3077a9e4bd3fd61055a1824946f6f2fb4aec583 (patch) | |
tree | 0d03996de0570b7ecd9d289a7f3b6cdf3600548e /source4/selftest | |
parent | 48029b35201e099aa7bbbe4390b59cfb7a2c6f69 (diff) | |
download | samba-c3077a9e4bd3fd61055a1824946f6f2fb4aec583.tar.gz samba-c3077a9e4bd3fd61055a1824946f6f2fb4aec583.tar.bz2 samba-c3077a9e4bd3fd61055a1824946f6f2fb4aec583.zip |
r24860: Make it easier to run selftest.pl in a Samba3 source tree.
(This used to be commit 53ec879e3168e9f56e774f0b0d70aeebb3795f8e)
Diffstat (limited to 'source4/selftest')
-rw-r--r-- | source4/selftest/env/Samba3.pm | 2 | ||||
-rw-r--r-- | source4/selftest/output/html.pm | 4 | ||||
-rwxr-xr-x | source4/selftest/selftest.pl | 4 | ||||
-rwxr-xr-x | source4/selftest/test_ejs.sh | 3 | ||||
-rwxr-xr-x | source4/selftest/test_nbt.sh | 3 | ||||
-rwxr-xr-x | source4/selftest/test_pidl.sh | 4 | ||||
-rwxr-xr-x | source4/selftest/test_s3upgrade.sh | 6 |
7 files changed, 10 insertions, 16 deletions
diff --git a/source4/selftest/env/Samba3.pm b/source4/selftest/env/Samba3.pm index b12208bd9f..bd7848e183 100644 --- a/source4/selftest/env/Samba3.pm +++ b/source4/selftest/env/Samba3.pm @@ -62,7 +62,7 @@ sub setup_env($$$) if ($envname eq "dc") { return $self->setup_dc("$path/dc"); } else { - die("Samba4 can't provide environment '$envname'"); + die("Samba3 can't provide environment '$envname'"); } } diff --git a/source4/selftest/output/html.pm b/source4/selftest/output/html.pm index 79775961c0..c4f94fb6b0 100644 --- a/source4/selftest/output/html.pm +++ b/source4/selftest/output/html.pm @@ -7,6 +7,8 @@ use Exporter; use strict; use warnings; +use FindBin qw($RealBin); + sub new($$$$) { my ($class, $dirname, $statistics) = @_; my $self = { @@ -25,7 +27,7 @@ sub new($$$$) { } }; - link("selftest/output/testresults.css", "$dirname/testresults.css"); + link("$RealBin/output/testresults.css", "$dirname/testresults.css"); open(INDEX, ">$dirname/index.html"); diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl index ad691c77ea..370120ab63 100755 --- a/source4/selftest/selftest.pl +++ b/source4/selftest/selftest.pl @@ -406,9 +406,9 @@ if ($opt_socket_wrapper) { my $target; if ($opt_target eq "samba4") { - $target = new Samba4("$srcdir/bin", $ldap, "$srcdir/setup"); + $target = new Samba4($opt_bindir or "$srcdir/bin", $ldap, "$srcdir/setup"); } elsif ($opt_target eq "samba3") { - if ($opt_socket_wrapper and `smbd -b | grep SOCKET_WRAPPER` eq "") { + if ($opt_socket_wrapper and `$opt_bindir/smbd -b | grep SOCKET_WRAPPER` eq "") { die("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'. Exiting...."); } diff --git a/source4/selftest/test_ejs.sh b/source4/selftest/test_ejs.sh index c81a2afefb..0282fce154 100755 --- a/source4/selftest/test_ejs.sh +++ b/source4/selftest/test_ejs.sh @@ -9,9 +9,6 @@ incdir=`dirname $0` SCRIPTDIR=../testprogs/ejs DATADIR=../testdata -PATH=bin:$PATH -export PATH - plantest "base.js" dc "$SCRIPTDIR/base.js" $CONFIGURATION plantest "samr.js" dc "$SCRIPTDIR/samr.js" $CONFIGURATION ncalrpc: -U\$USERNAME%\$PASSWORD plantest "echo.js" dc "$SCRIPTDIR/echo.js" $CONFIGURATION ncalrpc: -U\$USERNAME%\$PASSWORD diff --git a/source4/selftest/test_nbt.sh b/source4/selftest/test_nbt.sh index 1ff5ee641d..7346f75983 100755 --- a/source4/selftest/test_nbt.sh +++ b/source4/selftest/test_nbt.sh @@ -4,9 +4,6 @@ incdir=`dirname $0` . $incdir/test_functions.sh -PATH=bin:$PATH -export PATH - TEST_NBT_ENVNAME=$1 if test x"$TEST_NBT_ENVNAME" = x"";then TEST_NBT_ENVNAME="dc" diff --git a/source4/selftest/test_pidl.sh b/source4/selftest/test_pidl.sh index 6a20cd9fc8..7ee2e89e2e 100755 --- a/source4/selftest/test_pidl.sh +++ b/source4/selftest/test_pidl.sh @@ -10,8 +10,8 @@ incdir=`dirname $0` if test x"${PIDL_TESTS_SKIP}" = x"yes"; then echo "Skipping pidl tests - PIDL_TESTS_SKIP=yes" elif $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then - for f in pidl/tests/*.pl; do - plantest "$f" none $PERL $f "|" ./script/harness2subunit.pl + for f in $incdir/../pidl/tests/*.pl; do + plantest "`basename $f`" none $PERL $f "|" ./script/harness2subunit.pl done else echo "Skipping pidl tests - Test::More not installed" diff --git a/source4/selftest/test_s3upgrade.sh b/source4/selftest/test_s3upgrade.sh index 1ed43cb8eb..6b10323456 100755 --- a/source4/selftest/test_s3upgrade.sh +++ b/source4/selftest/test_s3upgrade.sh @@ -10,13 +10,11 @@ fi SCRIPTDIR=../testprogs/ejs DATADIR=../testdata -PATH=bin:$PATH -export PATH - mkdir -p $PREFIX rm -f $PREFIX/* -. selftest/test_functions.sh +incdir=`dirname $0` +. $incdir/test_functions.sh plantest "parse samba3" none bin/smbscript ../testdata/samba3/verify $CONFIGURATION ../testdata/samba3 #plantest "upgrade" none bin/smbscript setup/upgrade $CONFIGURATION --verify --targetdir=$PREFIX ../testdata/samba3 ../testdata/samba3/smb.conf |