svn commit: samba r24873 - in branches/SAMBA_4_0: .
source/selftest/env
jelmer at samba.org
jelmer at samba.org
Sat Sep 1 23:11:49 GMT 2007
Author: jelmer
Date: 2007-09-01 23:11:48 +0000 (Sat, 01 Sep 2007)
New Revision: 24873
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24873
Log:
Print smbd/nmbd log files for Samba 3.
Modified:
branches/SAMBA_4_0/
branches/SAMBA_4_0/source/selftest/env/Samba3.pm
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-09-01 23:01:33 UTC (rev 24872)
+++ branches/SAMBA_4_0/source/selftest/env/Samba3.pm 2007-09-01 23:11:48 UTC (rev 24873)
@@ -8,6 +8,7 @@
use strict;
use Cwd qw(abs_path);
use FindBin qw($RealBin);
+use POSIX;
sub binpath($$)
{
@@ -39,12 +40,32 @@
return 0;
}
+sub getlog_env_app($$$)
+{
+ my ($self, $envvars, $name) = @_;
+
+ my $title = "$name LOG of: $envvars->{NETBIOSNAME}\n";
+ my $out = $title;
+
+ open(LOG, "<".$envvars->{$name."_TEST_LOG"});
+
+ seek(LOG, $envvars->{$name."_TEST_LOG_POS"}, SEEK_SET);
+ while (<LOG>) {
+ $out .= $_;
+ }
+ $envvars->{$name."_TEST_LOG_POS"} = tell(LOG);
+ close(LOG);
+
+ return "" if $out eq $title;
+
+ return $out;
+}
+
sub getlog_env($$)
{
my ($self, $envvars) = @_;
- # TODO...
- return "";
+ return $self->getlog_env_app($envvars, "SMBD") . $self->getlog_env_app($envvars, "NMBD");
}
sub check_env($$)
@@ -62,7 +83,7 @@
if ($envname eq "dc") {
return $self->setup_dc("$path/dc");
} else {
- die("Samba3 can't provide environment '$envname'");
+ return undef;
}
}
More information about the samba-cvs
mailing list