svn commit: samba r22605 - in branches/SAMBA_4_0: . source/selftest
jelmer at samba.org
jelmer at samba.org
Mon Apr 30 12:48:43 GMT 2007
Author: jelmer
Date: 2007-04-30 12:48:42 +0000 (Mon, 30 Apr 2007)
New Revision: 22605
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22605
Log:
Set up all required environments before starting tests.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/selftest/selftest.pl
Changeset:
Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:merge
...skipped...
Modified: branches/SAMBA_4_0/source/selftest/selftest.pl
===================================================================
--- branches/SAMBA_4_0/source/selftest/selftest.pl 2007-04-30 12:11:45 UTC (rev 22604)
+++ branches/SAMBA_4_0/source/selftest/selftest.pl 2007-04-30 12:48:42 UTC (rev 22605)
@@ -134,6 +134,7 @@
my $opt_analyse_cmd = undef;
my $opt_resetup_env = undef;
my $opt_bindir = undef;
+my $opt_no_lazy_setup = undef;
my $srcdir = ".";
my $builddir = ".";
@@ -454,6 +455,7 @@
'testenv' => \$opt_testenv,
'ldap:s' => \$ldap,
'analyse-cmd=s' => \$opt_analyse_cmd,
+ 'no-lazy-setup' => \$opt_no_lazy_setup,
'resetup-environment' => \$opt_resetup_env,
'bindir:s' => \$opt_bindir,
);
@@ -647,6 +649,7 @@
my $testsdir = "$srcdir/selftest";
$ENV{CONFIGURATION} = "--configfile=$conffile";
+my %required_envs = ();
if ($opt_quick) {
open(IN, "$testsdir/tests_quick.sh|");
@@ -661,8 +664,10 @@
$env =~ s/\n//g;
my $cmdline = <IN>;
$cmdline =~ s/\n//g;
- push (@todo, [$name, $env, $cmdline])
- if (not defined($tests) or $name =~ /$tests/);
+ if (not defined($tests) or $name =~ /$tests/) {
+ $required_envs{$env} = 1;
+ push (@todo, [$name, $env, $cmdline]);
+ }
} else {
print;
}
@@ -777,6 +782,10 @@
$msg_ops = $plain_msg_ops;
}
+if ($opt_no_lazy_setup) {
+ setup_env($_) foreach (keys %required_envs);
+}
+
if ($opt_testenv) {
my $testenv_name = $ENV{SELFTEST_TESTENV};
$testenv_name = "dc" unless defined($testenv_name);
More information about the samba-cvs
mailing list