summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-11 23:53:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:06:41 -0500
commit2e6f0016d12000d7b8d8f5094d66e65ef618045b (patch)
treefb5325d378f3edbe3bf6b5a665a3f1783bc9671e
parent97f25fe522d71ad99a7a664e35422911de0af4e5 (diff)
downloadsamba-2e6f0016d12000d7b8d8f5094d66e65ef618045b.tar.gz
samba-2e6f0016d12000d7b8d8f5094d66e65ef618045b.tar.bz2
samba-2e6f0016d12000d7b8d8f5094d66e65ef618045b.zip
r25110: Show environment variables in HTML output.
(This used to be commit 62e770ace32f0e38863d4020773562e74117fc65)
-rw-r--r--.bzrignore1
-rw-r--r--source4/selftest/output/html.pm21
-rwxr-xr-xsource4/selftest/selftest.pl8
3 files changed, 27 insertions, 3 deletions
diff --git a/.bzrignore b/.bzrignore
index 39d94e8dcb..2e3c3ac05a 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -197,3 +197,4 @@ source/lib/tdb/bin/tdbdump
source/lib/registry/tools/common.h
source/librpc/ndr/ndr_table.h
test-results
+source/lib/ldb-samba/ldif_handlers.h
diff --git a/source4/selftest/output/html.pm b/source4/selftest/output/html.pm
index 7f5d128983..52fe241156 100644
--- a/source4/selftest/output/html.pm
+++ b/source4/selftest/output/html.pm
@@ -91,6 +91,27 @@ sub start_testsuite($$)
$self->print_html_header("Test Results for $state->{NAME}",
*TEST);
+
+ print TEST "<h2>Environment settings</h2>\n";
+
+ print TEST " <table>\n";
+ print TEST " <tr><td><b>Variable name</b></td><td><b>Variable value</b></td></tr>\n";
+ foreach (keys %{$state->{ENVVARS}}) {
+ print TEST " <tr><td>$_</td><td>";
+ my $val = $state->{ENVVARS}->{$_};
+ if ($val =~ /^\.\// and -r $val) {
+ print TEST "<a href=\"../$val\">$val</a>";
+ } elsif (-r $val) {
+ print TEST "<a href=\"$val\">$val</a>";
+ } else {
+ print TEST $val;
+ }
+ print TEST "</td></tr>\n";
+ }
+ print TEST " </table>\n";
+
+ print TEST "<h2>Tests</h2>\n";
+
print TEST " <table>\n";
}
diff --git a/source4/selftest/selftest.pl b/source4/selftest/selftest.pl
index 5b5c0146ad..7089cfa022 100755
--- a/source4/selftest/selftest.pl
+++ b/source4/selftest/selftest.pl
@@ -226,11 +226,12 @@ sub cleanup_pcap($$$)
$state->{PCAP_FILE} = undef;
}
-sub run_testsuite($$$$$$)
+sub run_testsuite($$$$$$$)
{
- my ($envname, $name, $cmd, $i, $totalsuites, $msg_ops) = @_;
+ my ($envname, $envvars, $name, $cmd, $i, $totalsuites, $msg_ops) = @_;
my $msg_state = {
ENVNAME => $envname,
+ ENVVARS => $envvars,
NAME => $name,
CMD => $cmd,
INDEX => $i,
@@ -755,7 +756,8 @@ $envvarstr
next;
}
- run_testsuite($envname, $name, $cmd, $i, $suitestotal, $msg_ops);
+ run_testsuite($envname, $envvars, $name, $cmd, $i, $suitestotal,
+ $msg_ops);
if (defined($opt_analyse_cmd)) {
system("$opt_analyse_cmd \"$name\"");