r25110: Show environment variables in HTML output.
[garming/samba-autobuild/.git] / source4 / selftest / output / html.pm
index 7f5d1289838f3a5847a1f33908d9993bf34826b6..52fe241156f3a37390b702a5e45f0edc33c5fa1c 100644 (file)
@@ -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";
 }