Changes in directory nightlytest-serverside:

machine.php updated: 1.4 -> 1.5
---
Log message:

My last commit tried to fix the issue where the coloring of the machine's test 
table could be bsaed on a comparison to a failed test, and thus bogus data. 
However that fix didnt work. This one fixes my previous error and hopefully 
ignores tests that have a failed build.


---
Diffs of the changes:  (+138 -134)

 machine.php |  272 ++++++++++++++++++++++++++++++------------------------------
 1 files changed, 138 insertions(+), 134 deletions(-)


Index: nightlytest-serverside/machine.php
diff -u nightlytest-serverside/machine.php:1.4 
nightlytest-serverside/machine.php:1.5
--- nightlytest-serverside/machine.php:1.4      Thu Jul 27 14:17:49 2006
+++ nightlytest-serverside/machine.php  Thu Jul 27 14:29:35 2006
@@ -183,17 +183,15 @@
 $line=1;
 $row = mysql_fetch_array($result);
 $x=0;
-while($x<10 && $prev_row = mysql_fetch_array($result)){
 
 
-$warnings ="";
-if(strcmp($row['warnings'],"")!=0){
-       $warnings=$row['warnings'];
-}
+while($x<10 && $prev_row = mysql_fetch_array($result)){
+       $warnings ="";
+       if(strcmp($row['warnings'],"")!=0){
+               $warnings=$row['warnings'];
+       }
+       $num_warnings = preg_match_all('/warning/', $warnings, $match); 
 
-$num_warnings = preg_match_all('/warning/', $warnings, $match);        
-       
-       
        if(strpos($row['buildstatus'],"OK")===FALSE){
                print "\t<tr bgcolor=#FFCC33>\n";
                $build_ok=0;
@@ -207,165 +205,171 @@
                $build_ok=1;
        }       
        $line++;
+       
+       #this test is to test whether the test that precedes this failed,
+       #thus the test would have bogus data and we shouldnt color based on its
+       #results
+       if(strpos($prev_row['buildstatus'],"OK")===false){
+               $prev_build_ok=0;
+       }
+       else{
+               $prev_build_ok=1;
+       }
 
-               /*~~~~~~~~~~~~ Date of test ~~~~~~~~~~~~*/
+       /*~~~~~~~~~~~~ Date of test ~~~~~~~~~~~~*/
 
-               echo "<td>";
-                       $date = 
preg_replace("/\s\d\d:\d\d:\d\d/","",$row['added']);
-                       echo "$date";
-               echo "</td>";
+       echo "<td>";
+               $date = preg_replace("/\s\d\d:\d\d:\d\d/","",$row['added']);
+               echo "$date";
+       echo "</td>";
 
-               /*~~~~~~~~~~~~ Get CVS Wall Time ~~~~~~~~~~~~*/
+       /*~~~~~~~~~~~~ Get CVS Wall Time ~~~~~~~~~~~~*/
 
-       
-               echo "<td>";
-                       echo $row['getcvstime_wall'];
-               echo "</td>";
-
-               /*~~~~~~~~~~~~ Configure Time CPU ~~~~~~~~~~~~*/
-               if($prev_row['configuretime_cpu']!=0 && $build_ok){
-                       $delta = round(( ($prev_row['configuretime_cpu'] - 
$row['configuretime_cpu']) / $prev_row['configuretime_cpu'] ) * 100,2);
-                       if ($delta > 20){
-                               print "<td 
bgcolor=#CCFFCC>{$row['configuretime_cpu']}</td>";
-                       }
-                       else if ($delta < -20){
-                               print "<td 
bgcolor=#FFAAAA>{$row['configuretime_cpu']}</td>";
-                       }
-                       else{
-                               print "<td>{$row['configuretime_cpu']}</td>";
-                       }
+
+       echo "<td>";
+               echo $row['getcvstime_wall'];
+       echo "</td>";
+
+       /*~~~~~~~~~~~~ Configure Time CPU ~~~~~~~~~~~~*/
+       if($prev_row['configuretime_cpu']!=0 && $build_ok && $prev_build_ok){
+               $delta = round(( ($prev_row['configuretime_cpu'] - 
$row['configuretime_cpu']) / $prev_row['configuretime_cpu'] ) * 100,2);
+               if ($delta > 20){
+                       print "<td 
bgcolor=#CCFFCC>{$row['configuretime_cpu']}</td>";
+               }
+               else if ($delta < -20){
+                       print "<td 
bgcolor=#FFAAAA>{$row['configuretime_cpu']}</td>";
                }
                else{
                        print "<td>{$row['configuretime_cpu']}</td>";
                }
+       }
+       else{
+               print "<td>{$row['configuretime_cpu']}</td>";
+       }
+
+       /*~~~~~~~~~~~~ Configure Time Wall ~~~~~~~~~~~~*/
 
-               /*~~~~~~~~~~~~ Configure Time Wall ~~~~~~~~~~~~*/
+       echo "<td>";
+               echo $row['configuretime_wall'];
+       echo "</td>";
 
-               echo "<td>";
-                       echo $row['configuretime_wall'];
-               echo "</td>";
-
-               /*~~~~~~~~~~~~ Build Time CPU ~~~~~~~~~~~~*/
-
-               if($prev_row['buildtime_cpu']!=0 && $build_ok){
-                       $delta = round(( ($prev_row['buildtime_cpu'] - 
$row['buildtime_cpu']) / $prev_row['buildtime_cpu'] ) * 100,2);
-                       if ($delta > 10){
-                               print "<td 
bgcolor=#CCFFCC>{$row['buildtime_cpu']}</td>";
-                       }
-                       else if ($delta < -10){
-                               print "<td 
bgcolor=#FFAAAA>{$row['buildtime_cpu']}</td>";
-                       }
-                       else{
-                               print "<td>{$row['buildtime_cpu']}</td>";
-                       }
+       /*~~~~~~~~~~~~ Build Time CPU ~~~~~~~~~~~~*/
+
+       if($prev_row['buildtime_cpu']!=0 && $build_ok && $prev_build_ok){
+               $delta = round(( ($prev_row['buildtime_cpu'] - 
$row['buildtime_cpu']) / $prev_row['buildtime_cpu'] ) * 100,2);
+               if ($delta > 10){
+                       print "<td 
bgcolor=#CCFFCC>{$row['buildtime_cpu']}</td>";
+               }
+               else if ($delta < -10){
+                       print "<td 
bgcolor=#FFAAAA>{$row['buildtime_cpu']}</td>";
                }
                else{
                        print "<td>{$row['buildtime_cpu']}</td>";
                }
+       }
+       else{
+               print "<td>{$row['buildtime_cpu']}</td>";
+       }
 
-               /*~~~~~~~~~~~~ Build Time Wall ~~~~~~~~~~~~*/
+       /*~~~~~~~~~~~~ Build Time Wall ~~~~~~~~~~~~*/
 
-               echo "<td>";
-                       echo $row['buildtime_wall'];
-               echo "</td>";
-       
-               /*~~~~~~~~~~~~ Dejagnu Time CPU ~~~~~~~~~~~~*/
+       echo "<td>";
+               echo $row['buildtime_wall'];
+       echo "</td>";
+
+       /*~~~~~~~~~~~~ Dejagnu Time CPU ~~~~~~~~~~~~*/
 
-               if($prev_row['dejagnutime_cpu']!=0 && $build_ok){
-                       $delta = round( ( ($prev_row['dejagnutime_cpu'] - 
$row['dejagnutime_cpu']) / $prev_row['dejagnutime_cpu'] ) * 100,2);
-                       if ($delta > 10){
-                               print "<td 
bgcolor=#CCFFCC>{$row['dejagnutime_cpu']}</td>";
-                       }
-                       else if ($delta < -10){
-                               print "<td 
bgcolor=#FFAAAA>{$row['dejagnutime_cpu']}</td>";
-                       }
-                       else{
-                               print "<td>{$row['dejagnutime_cpu']}</td>";
-                       }
+       if($prev_row['dejagnutime_cpu']!=0 && $build_ok && $prev_build_ok){
+               $delta = round( ( ($prev_row['dejagnutime_cpu'] - 
$row['dejagnutime_cpu']) / $prev_row['dejagnutime_cpu'] ) * 100,2);
+               if ($delta > 10){
+                       print "<td 
bgcolor=#CCFFCC>{$row['dejagnutime_cpu']}</td>";
+               }
+               else if ($delta < -10){
+                       print "<td 
bgcolor=#FFAAAA>{$row['dejagnutime_cpu']}</td>";
                }
                else{
                        print "<td>{$row['dejagnutime_cpu']}</td>";
                }
-               
+       }
+       else{
+               print "<td>{$row['dejagnutime_cpu']}</td>";
+       }
+       
 
-               /*~~~~~~~~~~~~ Dejagnu Time Wall ~~~~~~~~~~~~*/
+       /*~~~~~~~~~~~~ Dejagnu Time Wall ~~~~~~~~~~~~*/
 
-               echo "<td>";
-                       echo $row['dejagnutime_wall'];
-               echo "</td>";
+       echo "<td>";
+               echo $row['dejagnutime_wall'];
+       echo "</td>";
 
-               /*~~~~~~~~~~~~ # of expected passes ~~~~~~~~~~~~*/
+       /*~~~~~~~~~~~~ # of expected passes ~~~~~~~~~~~~*/
 
-               if ($row['teststats_exppass'] > $prev_row['teststats_exppass'] 
&& $build_ok){
-                       $color="#CCFFCC";
-               }
-               else if ($row['teststats_exppass'] < 
$prev_row['teststats_exppass'] && $build_ok){
-                       $color="#FFAAAA";       
-               }
-               else{
-                       $color="white";
-               }
-               if(!$build_ok){
-                       print "<td>{$row['teststats_exppass']}</td>";           
-               }
-               else{
-                       print "<td 
bgcolor=$color>{$row['teststats_exppass']}</td>";            
-               }
-               /*~~~~~~~~~~~~ # of unexpected failures ~~~~~~~~~~~~*/
+       if ($row['teststats_exppass'] > $prev_row['teststats_exppass'] && 
$build_ok && $prev_build_ok){
+               $color="#CCFFCC";
+       }
+       else if ($row['teststats_exppass'] < $prev_row['teststats_exppass'] && 
$build_ok  && $prev_build_ok){
+               $color="#FFAAAA";       
+       }
+       else{
+               $color="white";
+       }
+       if(!$build_ok){
+               print "<td>{$row['teststats_exppass']}</td>";           
+       }
+       else{
+               print "<td bgcolor=$color>{$row['teststats_exppass']}</td>";    
        
+       }
+       /*~~~~~~~~~~~~ # of unexpected failures ~~~~~~~~~~~~*/
 
-               if ($row['teststats_unexpfail'] < 
$prev_row['teststats_unexpfail'] && $build_ok){
-                       $color="#CCFFCC";
-               }
-               else if ($row['teststats_unexpfail'] > 
$prev_row['teststats_unexpfail'] && $build_ok){
-                       $color="#FFAAAA";       
-               }
-               else{
-                       $color="white";
-               }
+       if ($row['teststats_unexpfail'] < $prev_row['teststats_unexpfail'] && 
$build_ok && $prev_build_ok){
+               $color="#CCFFCC";
+       }
+       else if ($row['teststats_unexpfail'] > $prev_row['teststats_unexpfail'] 
&& $build_ok && $prev_build_ok){
+               $color="#FFAAAA";       
+       }
+       else{
+               $color="white";
+       }
 
-               if(!$build_ok){
-                        print "<td>{$row['teststats_unexpfail']}</td>";
-                }
-               else if($row['teststats_exppass']!=0){
-                       print "<td bgcolor=$color><a 
href=\"test.php?machine=$machine&night={$row['id']}#unexpfail_tests\">{$row['teststats_unexpfail']}</a></td>";
-               }
-               else{
-                       print "<td 
bgcolor=$color>{$row['teststats_unexpfail']}</td>";          
-               }
+       if(!$build_ok){
+               print "<td>{$row['teststats_unexpfail']}</td>";
+       }
+       else if($row['teststats_exppass']!=0){
+               print "<td bgcolor=$color><a 
href=\"test.php?machine=$machine&night={$row['id']}#unexpfail_tests\">{$row['teststats_unexpfail']}</a></td>";
+       }
+       else{
+               print "<td bgcolor=$color>{$row['teststats_unexpfail']}</td>";  
        
+       }
 
-               /*~~~~~~~~~~~~ # of expected failures ~~~~~~~~~~~~*/
+       /*~~~~~~~~~~~~ # of expected failures ~~~~~~~~~~~~*/
 
-               if ($row['teststats_expfail'] < $prev_row['teststats_expfail'] 
&& $build_ok){
-                       print "<td 
bgcolor=#CCFFCC>{$row['teststats_expfail']}</td>";
-               }
-               else if ($row['teststats_expfail'] > 
$prev_row['teststats_expfail'] && $build_ok){
-                       print "<td 
bgcolor=#FFAAAA>{$row['teststats_expfail']}</td>";
-               }
-               else{
-                       print "<td>{$row['teststats_expfail']}</td>";
-               }
+                               if ($row['teststats_expfail'] < 
$prev_row['teststats_expfail'] && $build_ok && $prev_build_ok){
+               print "<td bgcolor=#CCFFCC>{$row['teststats_expfail']}</td>";
+       }
+       else if ($row['teststats_expfail'] > $prev_row['teststats_expfail'] && 
$build_ok && $prev_build_ok){
+               print "<td bgcolor=#FFAAAA>{$row['teststats_expfail']}</td>";
+       }
+       else{
+               print "<td>{$row['teststats_expfail']}</td>";
+       }
 
-               /*~~~~~~~~~~~~ Number Of Warnings ~~~~~~~~~~~~*/
-       
-               if($num_warnings>0){
-                       print "\t<td><a 
href=\"test.php?machine=$machine&night={$row['id']}#warnings\">$num_warnings</a></td>\n";
-               }       
-               else{
-                       print "\t<td>$num_warnings</td>\n";
-               }
+       /*~~~~~~~~~~~~ Number Of Warnings ~~~~~~~~~~~~*/
 
-               /*~~~~~~~~~~~~ Link to test page ~~~~~~~~~~~~*/
-       
-               echo "<td>";
-                       print "<a 
href=\"test.php?machine=$machine&night={$row['id']}\">View details</a>\n";
-               echo "</td>";
+       if($num_warnings>0){
+               print "\t<td><a 
href=\"test.php?machine=$machine&night={$row['id']}#warnings\">$num_warnings</a></td>\n";
+       }       
+       else{
+               print "\t<td>$num_warnings</td>\n";
+       }
+
+       /*~~~~~~~~~~~~ Link to test page ~~~~~~~~~~~~*/
+
+       echo "<td>";
+               print "<a 
href=\"test.php?machine=$machine&night={$row['id']}\">View details</a>\n";
+       echo "</td>";
        echo "</tr>";
        
-       #this is to ensure we dont compare a test's statistics against
-       #a test that failed and has bogus statistics
-       if($build_ok){
-               $row = $prev_row;
-       }
+       $row = $prev_row;
        $x++;
 } #end while
 



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to