diff --git a/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/consoleLogs.php b/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/consoleLogs.php index 06811384d69b1e163ab12da1859ca96e050f725d..07d1ba4dfa424bbed95bc6289d15999cb6654bc3 100644 --- a/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/consoleLogs.php +++ b/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/consoleLogs.php @@ -1,11 +1,11 @@ <html> <head> <?php - $parts = explode("/", getcwd()); - $parts2 = explode("-", $parts[count($parts) - 1]); - $buildName = $parts2[1]; - - echo "<title>Test Console Output for $buildName </title>"; + $parts = explode("/", getcwd()); + $parts2 = explode("-", $parts[count($parts) - 1]); + $buildName = $parts2[1]; + + echo "<title>Test Console Output for $buildName </title>"; ?> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" type="text/css"> @@ -15,9 +15,9 @@ <p><b><font face="Verdana" size="+3">Test Console Output</font></b> </p> <table border=0 cellspacing=5 cellpadding=2 width="100%" > - <tr> - <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Console - output from running JUnit plugin tests for + <tr> + <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Console + output from running JUnit plugin tests for <?php echo "$buildName"; ?> </font></b></td> </tr> @@ -25,31 +25,53 @@ <table border="0"> <?php - $hasNotes = false; - $aDirectory = dir("testResults/consolelogs"); - $index = 0; - while ($anEntry = $aDirectory->read()) { - if ($anEntry != "." && $anEntry != "..") { - $entries[$index] = $anEntry; - $index++; - } - } - - aDirectory.closedir(); - sort($entries); - - for ($i = 0; $i < $index; $i++) { - $anEntry = $entries[$i]; - $line = "<td>Component: <a href=\"testResults/consolelogs/$anEntry\">$anEntry</a></td>"; - echo "<tr>"; - echo "$line"; - echo "</tr>"; - $hasNotes = true; - } - - if (!$hasNotes) { - echo "<br>There are no test logs for this build."; - } + $hasNotes = false; + $aDirectory = dir("testResults/consolelogs"); + $index = 0; + while ($anEntry = $aDirectory->read()) { + if ($anEntry != "." && $anEntry != "..") { + $entries[$index] = $anEntry; + $index++; + } + } + aDirectory.closedir(); + + + sort($entries); + + $indentLevel = " "; + for ($i = 0; $i < $index; $i++) { + $anEntry = $entries[$i]; + $logsize = filesize("testResults/consolelogs/$anEntry"); + + + $level = 0; + if ($logsize > 20000) { + $level = 2; + } + else if ($logsize > 2000) { + $level = 1; + } + + if ($level == 0) { + $line = "<td>$indentLevel$indentLevel<a href=\"testResults/consolelogs/$anEntry\">$anEntry</a> ($logsize bytes)</td>"; + } + else if ($level == 1) { + $line = "<td><em>$indentLevel<a href=\"testResults/consolelogs/$anEntry\">$anEntry</a> ($logsize bytes)</em></td>"; + } else if ($level == 2) { + $line = "<td><strong><a href=\"testResults/consolelogs/$anEntry\">$anEntry</a> ($logsize bytes)</strong></td>"; + } + + + echo "<tr>"; + echo "$line"; + echo "</tr>"; + $hasNotes = true; + } + + if (!$hasNotes) { + echo "<br>There are no test logs for this build."; + } ?> </table>