Rev 11695: Couple of random minor improvements. in file:///home/jelmer/bzr.samba/4.0-envs/

Jelmer Vernooij jelmer at samba.org
Wed Mar 21 14:27:58 GMT 2007


At file:///home/jelmer/bzr.samba/4.0-envs/

------------------------------------------------------------
revno: 11695
revision-id: jelmer at samba.org-20070321142743-w78mflk9kcxf9du4
parent: jelmer at samba.org-20070321013659-as0sp5dcnrq622fs
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 4.0-envs
timestamp: Wed 2007-03-21 15:27:43 +0100
message:
  Couple of random minor improvements.
modified:
  source/script/tests/Windows.pm windows.pm-20070307001935-dmbansbt3gpgi44l-1
  source/script/tests/selftest.pl svn-v2:20693 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fselftest.pl
=== modified file 'source/script/tests/Windows.pm'
--- a/source/script/tests/Windows.pm	2007-03-07 01:13:14 +0000
+++ b/source/script/tests/Windows.pm	2007-03-21 14:27:43 +0000
@@ -9,6 +9,14 @@
 use FindBin qw($RealBin);
 use POSIX;
 
+sub new($)
+{
+	my ($classname) = @_;
+	my $self = { };
+	bless $self;
+	return $self;
+}
+
 sub provision($$$)
 {
 	my ($self, $environment, $prefix) = @_;
@@ -24,4 +32,9 @@
 	$ENV{WINTEST_DIR}="$ENV{SRCDIR}/script/tests/win";
 }
 
+sub setup_env($$)
+{
+	my ($self, $name) = @_;
+}
+
 1;

=== modified file 'source/script/tests/selftest.pl'
--- a/source/script/tests/selftest.pl	2007-03-21 01:36:59 +0000
+++ b/source/script/tests/selftest.pl	2007-03-21 14:27:43 +0000
@@ -383,19 +383,6 @@
 
 my @torture_options = ();
 
-die("Windows tests will not run with socket wrapper enabled.") 
-	if ($opt_socket_wrapper and $opt_target eq "win");
-
-my $target;
-
-if ($opt_target eq "samba4") {
-	$target = new Samba4("$srcdir/bin", $ldap, "$srcdir/setup");
-} elsif ($opt_target eq "samba3") {
-	$target = new Samba3("$srcdir/bin", "$srcdir/setup");
-} elsif ($opt_target eq "win") {
-	$target = new Windows();
-}
-
 if ($opt_socket_wrapper_pcap) {
 	$ENV{SOCKET_WRAPPER_PCAP_FILE} = $opt_socket_wrapper_pcap;
 	# Socket wrapper pcap implies socket wrapper
@@ -409,10 +396,17 @@
 	print "SOCKET_WRAPPER_DIR=$socket_wrapper_dir\n";
 }
 
-my $testenv_vars;
-$testenv_vars = $target->provision("dc", "$prefix/dc");
+my $target;
 
-foreach (keys %$testenv_vars) { $ENV{$_} = $testenv_vars->{$_}; }
+if ($opt_target eq "samba4") {
+	$target = new Samba4("$srcdir/bin", $ldap, "$srcdir/setup");
+} elsif ($opt_target eq "samba3") {
+	$target = new Samba3("$srcdir/bin", "$srcdir/setup");
+} elsif ($opt_target eq "win") {
+	die("Windows tests will not run with socket wrapper enabled.") 
+		if ($opt_socket_wrapper);
+	$target = new Windows();
+}
 
 if (defined($opt_expected_failures)) {
 	open(KNOWN, "<$opt_expected_failures") or die("unable to read known failures file: $!");
@@ -432,6 +426,11 @@
 	close(SKIP);
 }
 
+my $testenv_vars;
+$testenv_vars = $target->provision("dc", "$prefix/dc");
+
+foreach (keys %$testenv_vars) { $ENV{$_} = $testenv_vars->{$_}; }
+
 SocketWrapper::set_default_iface(1);
 $target->check_or_start($testenv_vars, $socket_wrapper_dir, 
 	($ENV{SMBD_MAX_TIME} or 5400));
@@ -446,7 +445,7 @@
 						 "127.0.0.11/8"));
 
 push (@torture_options, "--option=interfaces=$interfaces");
-push (@torture_options, $ENV{CONFIGURATION});
+push (@torture_options, $testenv_vars->{CONFIGURATION});
 # ensure any one smbtorture call doesn't run too long
 push (@torture_options, "--maximum-runtime=$torture_maxtime");
 push (@torture_options, "--target=$opt_target");
@@ -489,6 +488,7 @@
 my $i = 0;
 $| = 1;
 
+# The Kerberos tests fail if this variable is set.
 delete $ENV{DOMAIN};
 
 if ($opt_testenv) {
@@ -538,7 +538,6 @@
 	my $ok = $statistics->{TESTS_EXPECTED_OK} + $statistics->{TESTS_EXPECTED_FAIL};
 	print "ALL OK ($ok tests in $statistics->{SUITES_OK} testsuites)\n";
 } else {
-
 	unless ($from_build_farm) {
 		if (not $opt_immediate and not $opt_verbose) {
 			foreach (@$suitesfailed) {



More information about the samba-cvs mailing list