r24860: Make it easier to run selftest.pl in a Samba3 source tree.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 1 Sep 2007 00:36:01 +0000 (00:36 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:03:21 +0000 (15:03 -0500)
(This used to be commit 53ec879e3168e9f56e774f0b0d70aeebb3795f8e)

source4/selftest/env/Samba3.pm
source4/selftest/output/html.pm
source4/selftest/selftest.pl
source4/selftest/test_ejs.sh
source4/selftest/test_nbt.sh
source4/selftest/test_pidl.sh
source4/selftest/test_s3upgrade.sh

index b12208bd9f72f754b79b8df8a077141e7f36fc1e..bd7848e183168d7392af193947818e54f88ce84f 100644 (file)
@@ -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'");
        }
 }
 
index 79775961c0e3be172a01f074888b8af4008a1f7f..c4f94fb6b08560b9d546bc47e479ae8a8bfe413d 100644 (file)
@@ -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");
 
index ad691c77ea0495330a719e7ced392c3991e58952..370120ab6388b59abd753b622291dae7410d72fe 100755 (executable)
@@ -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....");
        }
 
index c81a2afefbec04693968242f6372f0899ab069ea..0282fce154a7ae00c3b919b44dd9c0e7d58b0f63 100755 (executable)
@@ -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
index 1ff5ee641d64a111a5d7127cd3c652fc139f736e..7346f7598396843f348cbb60caa3e7867273e88e 100755 (executable)
@@ -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"
index 6a20cd9fc8f64778092fb4c9bc9a030f873eabd2..7ee2e89e2e28e226c712ca17a15a0730ef765b43 100755 (executable)
@@ -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"
index 1ed43cb8ebee365cfbc92b674803b069ae4bc4ba..6b1032345651dbd1eda93558428ee283cbe07f4a 100755 (executable)
@@ -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