1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r22375: implement check_env() logic in the frontend

metze
(This used to be commit 0b48ca5d3e)
This commit is contained in:
Stefan Metzmacher 2007-04-19 14:54:09 +00:00 committed by Gerald (Jerry) Carter
parent 49f71c5c97
commit e2deb00136
3 changed files with 37 additions and 1 deletions

View File

@ -47,6 +47,14 @@ sub getlog_env($$)
return "";
}
sub check_env($$)
{
my ($self, $envvars) = @_;
# TODO ...
return 1;
}
sub setup_env($$$)
{
my ($self, $envname, $path) = @_;

View File

@ -675,6 +675,14 @@ sub getlog_env($$)
return $out;
}
sub check_env($$)
{
my ($self, $envvars) = @_;
# TODO ...
return 1;
}
sub setup_env($$$)
{
my ($self, $envname, $path) = @_;

View File

@ -679,11 +679,17 @@ sub setup_env($)
my $testenv_vars;
if (defined($running_envs{$envname})) {
$testenv_vars = $running_envs{$envname};
if (not $target->check_env($testenv_vars)) {
$testenv_vars = undef;
}
} elsif ($envname eq "none") {
$testenv_vars = {};
} else {
$testenv_vars = $target->setup_env($envname, $prefix);
}
return undef unless defined($testenv_vars);
write_clientconf($conffile, $testenv_vars);
foreach ("PASSWORD", "DOMAIN", "SERVER", "USERNAME", "NETBIOSNAME",
"KRB5_CONFIG", "REALM") {
@ -707,6 +713,13 @@ sub getlog_env($)
return $target->getlog_env($running_envs{$envname});
}
sub check_env($)
{
my ($envname) = @_;
return 1 if ($envname eq "none");
return $target->check_env($running_envs{$envname});
}
sub teardown_env($)
{
my ($envname) = @_;
@ -750,7 +763,14 @@ NETBIOSNAME=\$NETBIOSNAME\" && bash'");
next;
}
setup_env($envname);
my $envvars = setup_env($envname);
if (not defined($envvars)) {
push(@$suitesfailed, $name);
$statistics->{SUITES_FAIL}++;
$statistics->{TESTS_ERROR}++;
print "FAIL: $name (ENV[$envname] not available!)\n";
next;
}
run_test($envname, $name, $cmd, $i, $suitestotal, $msg_ops);