1 <html> 2 <head> 3 <?php 4 $parts = explode("/", getcwd()); 5 $parts2 = explode("-", $parts[count($parts) - 1]); 6 $buildName = $parts2[1]; 7 8 // Get build type names 9 10 $fileHandle = fopen("../../dlconfig.txt", "r"); 11 while (!feof($fileHandle)) { 12 13 $aLine = fgets($fileHandle, 4096); // Length parameter only optional after 4.2.0 14 $parts = explode(",", $aLine); 15 $dropNames[trim($parts[0])] = trim($parts[1]); 16 } 17 fclose($fileHandle); 18 19 $buildType = $dropNames[$parts2[0]]; 20 21 echo "<title>Test Console Output for $buildType $buildName </title>"; 22 ?> 23 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 24 <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" type="text/css"> 25 <title>Console Logs from Running JUnit Plug-in Tests</title></head> 26 <body> 27 28 <p><b><font face="Verdana" size="+3">Test Console Output</font></b> </p> 29 30 <table border=0 cellspacing=5 cellpadding=2 width="100%" > 31 <tr> 32 <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Console 33 output from running JUnit plugin tests for 34 <?php echo "$buildType $buildName"; ?> 35 </font></b></td> 36 </tr> 37 </table> 38 <table border="0"> 39 40 <?php 41 $hasNotes = false; 42 $aDirectory = dir("testresults/consolelogs"); 43 $index = 0; 44 while ($anEntry = $aDirectory->read()) { 45 if ($anEntry != "." && $anEntry != "..") { 46 $entries[$index] = $anEntry; 47 $index++; 48 } 49 } 50 51 aDirectory.closedir(); 52 sort($entries); 53 54 for ($i = 0; $i < $index; $i++) { 55 $anEntry = $entries[$i]; 56 $line = "<td>Component: <a href=\"testresults/consolelogs/$anEntry\">$anEntry</a></td>"; 57 echo "<tr>"; 58 echo "$line"; 59 echo "</tr>"; 60 $hasNotes = true; 61 } 62 63 if (!$hasNotes) { 64 echo "<br>There are no test logs for this build."; 65 } 66 ?> 67 68 </table> 69 </body> 70 </html> 71