svn commit: samba r24860 - in branches/SAMBA_4_0: . source/selftest source/selftest/env source/selftest/output

jelmer at samba.org jelmer at samba.org
Sat Sep 1 00:36:05 GMT 2007


Author: jelmer
Date: 2007-09-01 00:36:01 +0000 (Sat, 01 Sep 2007)
New Revision: 24860

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24860

Log:
Make it easier to run selftest.pl in a Samba3 source tree.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/selftest/env/Samba3.pm
   branches/SAMBA_4_0/source/selftest/output/html.pm
   branches/SAMBA_4_0/source/selftest/selftest.pl
   branches/SAMBA_4_0/source/selftest/test_ejs.sh
   branches/SAMBA_4_0/source/selftest/test_nbt.sh
   branches/SAMBA_4_0/source/selftest/test_pidl.sh
   branches/SAMBA_4_0/source/selftest/test_s3upgrade.sh


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/selftest/env/Samba3.pm
===================================================================
--- branches/SAMBA_4_0/source/selftest/env/Samba3.pm	2007-08-31 23:15:03 UTC (rev 24859)
+++ branches/SAMBA_4_0/source/selftest/env/Samba3.pm	2007-09-01 00:36:01 UTC (rev 24860)
@@ -62,7 +62,7 @@
 	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'");
 	}
 }
 

Modified: branches/SAMBA_4_0/source/selftest/output/html.pm
===================================================================
--- branches/SAMBA_4_0/source/selftest/output/html.pm	2007-08-31 23:15:03 UTC (rev 24859)
+++ branches/SAMBA_4_0/source/selftest/output/html.pm	2007-09-01 00:36:01 UTC (rev 24860)
@@ -7,6 +7,8 @@
 use strict;
 use warnings;
 
+use FindBin qw($RealBin);
+
 sub new($$$$) {
 	my ($class, $dirname, $statistics) = @_;
 	my $self = { 
@@ -25,7 +27,7 @@
 		}
 	};
 
-	link("selftest/output/testresults.css", "$dirname/testresults.css");
+	link("$RealBin/output/testresults.css", "$dirname/testresults.css");
 
 	open(INDEX, ">$dirname/index.html");
 

Modified: branches/SAMBA_4_0/source/selftest/selftest.pl
===================================================================
--- branches/SAMBA_4_0/source/selftest/selftest.pl	2007-08-31 23:15:03 UTC (rev 24859)
+++ branches/SAMBA_4_0/source/selftest/selftest.pl	2007-09-01 00:36:01 UTC (rev 24860)
@@ -406,9 +406,9 @@
 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....");
 	}
 

Modified: branches/SAMBA_4_0/source/selftest/test_ejs.sh
===================================================================
--- branches/SAMBA_4_0/source/selftest/test_ejs.sh	2007-08-31 23:15:03 UTC (rev 24859)
+++ branches/SAMBA_4_0/source/selftest/test_ejs.sh	2007-09-01 00:36:01 UTC (rev 24860)
@@ -9,9 +9,6 @@
 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

Modified: branches/SAMBA_4_0/source/selftest/test_nbt.sh
===================================================================
--- branches/SAMBA_4_0/source/selftest/test_nbt.sh	2007-08-31 23:15:03 UTC (rev 24859)
+++ branches/SAMBA_4_0/source/selftest/test_nbt.sh	2007-09-01 00:36:01 UTC (rev 24860)
@@ -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"

Modified: branches/SAMBA_4_0/source/selftest/test_pidl.sh
===================================================================
--- branches/SAMBA_4_0/source/selftest/test_pidl.sh	2007-08-31 23:15:03 UTC (rev 24859)
+++ branches/SAMBA_4_0/source/selftest/test_pidl.sh	2007-09-01 00:36:01 UTC (rev 24860)
@@ -10,8 +10,8 @@
 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"

Modified: branches/SAMBA_4_0/source/selftest/test_s3upgrade.sh
===================================================================
--- branches/SAMBA_4_0/source/selftest/test_s3upgrade.sh	2007-08-31 23:15:03 UTC (rev 24859)
+++ branches/SAMBA_4_0/source/selftest/test_s3upgrade.sh	2007-09-01 00:36:01 UTC (rev 24860)
@@ -10,13 +10,11 @@
 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



More information about the samba-cvs mailing list