Rev 11328: Merge upstream in file:///home/jelmer/bzr.samba/4.0-perlselftest/

Jelmer Vernooij jelmer at samba.org
Mon Mar 5 14:34:04 GMT 2007


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

------------------------------------------------------------
revno: 11328
revision-id: jelmer at samba.org-20070305143353-ovx3ae65ubuz1mpd
parent: jelmer at samba.org-20070305141531-u5h8rx1x1inwcgdr
parent: jelmer at samba.org-20070305141504-hz0jr91vycs2yvyn
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: 4.0-perlselftest
timestamp: Mon 2007-03-05 15:33:53 +0100
message:
  Merge upstream
modified:
  source/script/tests/selftest.pl svn-v2:20693 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2fselftest.pl
  source/script/tests/tests_all.sh svn-v2:8525 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2ftests_all.sh
  source/script/tests/tests_quick.sh svn-v2:8525 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0-source%2fscript%2ftests%2ftests_quick.sh
    ------------------------------------------------------------
    revno: 11286.1.5.1.27.1.8.1.345
    merged: jelmer at samba.org-20070305141504-hz0jr91vycs2yvyn
    parent: svn-v2:21700 at 0c0555d6-39d7-0310-84fc-f1cc0bd64818-branches%2fSAMBA_4_0
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: SAMBA_4_0
    timestamp: Mon 2007-03-05 15:15:04 +0100
    message:
      Fix ejs tests.
=== modified file 'source/script/tests/selftest.pl'
--- a/source/script/tests/selftest.pl	2007-02-21 22:55:05 +0000
+++ b/source/script/tests/selftest.pl	2007-03-05 14:33:53 +0000
@@ -360,9 +360,10 @@
 
 my @torture_options = ();
 
+my $testenv_vars = {};
+
 if ($opt_target eq "samba4") {
-	my $vars = Samba4::provision($prefix);
-	foreach (keys %$vars) { $ENV{$_} = $vars->{$_}; }
+	$testenv_vars = Samba4::provision($prefix);
 } elsif ($opt_target eq "win") {
 	die ("Windows tests will not run without root privileges.") 
 		if (`whoami` ne "root");
@@ -427,7 +428,7 @@
 	$max_time = $ENV{SMBD_MAX_TIME};
 }
 Samba4::smbd_check_or_start($bindir, $test_fifo, $ENV{SMBD_TEST_LOG}, 
-	                $socket_wrapper_dir, $max_time, $ENV{CONFFILE});
+	                $socket_wrapper_dir, $max_time, $testenv_vars->{CONFFILE});
 
 SocketWrapper::set_default_iface(6);
 
@@ -439,7 +440,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");
@@ -454,6 +455,10 @@
 
 my @todo = ();
 
+my %OLDENV = %ENV;
+
+foreach (keys %$testenv_vars) { $ENV{$_} = $testenv_vars->{$_}; }
+
 if ($opt_target eq "win") {
 	system("$testsdir/test_win.sh");
 } else { 
@@ -479,6 +484,13 @@
 
 Samba4::wait_for_start();
 
+%ENV = %OLDENV;
+
+foreach (qw(KRB5_CONFIG PREFIX_ABS TEST_DATA_PREFIX CONFIGURATION CONFFILE
+PIDDIR AUTH SERVER NETBIOSNAME)) {
+	$ENV{$_} = $testenv_vars->{$_};
+}
+
 # start off with 0 failures
 $ENV{failed} = 0;
 

=== modified file 'source/script/tests/tests_all.sh'
--- a/source/script/tests/tests_all.sh	2007-03-03 14:53:04 +0000
+++ b/source/script/tests/tests_all.sh	2007-03-05 14:33:53 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
- $SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD
+ $SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD $CONFIGURATION
  $SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD
  $SRCDIR/script/tests/test_nbt.sh $SERVER
  $SRCDIR/script/tests/test_rpc.sh $SERVER $USERNAME $PASSWORD $DOMAIN

=== modified file 'source/script/tests/tests_quick.sh'
--- a/source/script/tests/tests_quick.sh	2007-01-25 11:37:20 +0000
+++ b/source/script/tests/tests_quick.sh	2007-03-05 14:33:53 +0000
@@ -2,7 +2,7 @@
 TORTURE_QUICK="yes"
 export TORTURE_QUICK
 
-$SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD
+$SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD $CONFIGURATION
 $SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD
 $SRCDIR/script/tests/test_nbt.sh $SERVER
 $SRCDIR/script/tests/test_quick.sh //$SERVER/cifs $USERNAME $PASSWORD ""



More information about the samba-cvs mailing list