[llvm-commits] CVS: nightlytest-serverside/NightlyTester.php ProgramResults.php fulltest.php test.php

Patrick Jenkins pjenkins at apple.com
Mon Aug 21 13:22:09 PDT 2006



Changes in directory nightlytest-serverside:

NightlyTester.php updated: 1.17 -> 1.18
ProgramResults.php updated: 1.7 -> 1.8
fulltest.php updated: 1.14 -> 1.15
test.php updated: 1.16 -> 1.17
---
Log message:

Added a new collapsable menu to the brief and full nightly tester pages. 
This new menu displays the failures for the test suite. The test suite
changes section of the nightly reports has also been changed so that if a
category (i.e. newly passing tests newly failing tests, etc, etc) is empty,
it now reports "None" instead of being blank. This prevents the report from
appearing incomplete.



---
Diffs of the changes:  (+94 -22)

 NightlyTester.php  |    6 +++---
 ProgramResults.php |   19 +++++++++++++++++++
 fulltest.php       |   49 ++++++++++++++++++++++++++++++++++++++-----------
 test.php           |   42 ++++++++++++++++++++++++++++++++++--------
 4 files changed, 94 insertions(+), 22 deletions(-)


Index: nightlytest-serverside/NightlyTester.php
diff -u nightlytest-serverside/NightlyTester.php:1.17 nightlytest-serverside/NightlyTester.php:1.18
--- nightlytest-serverside/NightlyTester.php:1.17	Fri Aug 18 13:52:08 2006
+++ nightlytest-serverside/NightlyTester.php	Mon Aug 21 15:21:55 2006
@@ -244,7 +244,8 @@
   $result=array();
 
   //setting up the night ids
-  $select = "select id from night WHERE id<$night_id and machine=$machine_id order by added desc";
+  $select = "select id from night WHERE id<$night_id and machine=$machine_id ".
+            "and buildstatus=\"OK\" order by added desc";
   $query = mysql_query($select) or die (mysql_error());
   $row=mysql_fetch_array($query);
   
@@ -254,7 +255,6 @@
   $old_night=$row['id'];
   mysql_free_result($query);
   
- 
   if($cur_night>0) { $cur_data=getAllFileSizes($mysql_link, $cur_night); }
   if($prev_night>0) { $prev_data=getAllFileSizes($mysql_link, $prev_night); }
   if($old_night>0) { $old_data=getAllFileSizes($mysql_link, $old_night); }
@@ -270,7 +270,7 @@
   foreach (array_keys($cur_data) as $file){
     $cur_sum+=$cur_data["$file"];
     
-    if(isset($prev_data["$file"]) && isset($cur_data["$file"])) {
+    if(isset($prev_data[$file]) && isset($cur_data["$file"])) {
       $prev_delta= ( $cur_data["$file"] - $prev_data["$file"] );
       $prev_diff = (($cur_data["$file"] - $prev_data["$file"]) / $prev_data["$file"] ) * 100;
       $prev_sum+=$prev_data["$file"];


Index: nightlytest-serverside/ProgramResults.php
diff -u nightlytest-serverside/ProgramResults.php:1.7 nightlytest-serverside/ProgramResults.php:1.8
--- nightlytest-serverside/ProgramResults.php:1.7	Fri Aug 18 14:18:42 2006
+++ nightlytest-serverside/ProgramResults.php	Mon Aug 21 15:21:55 2006
@@ -386,6 +386,25 @@
 }
 
 /*
+ * Get failing tests
+ *
+ * This is somewhat of a hack because from night 684 forward we now store the test 
+ * in their own table as oppoesd in the night table.
+ */
+function getFailures($night_id, $mysql_link){
+  $result="";
+  if($night_id>=684){
+    $query = "SELECT * FROM tests WHERE night=$night_id AND result=\"FAIL\" AND measure!=\"dejagnu\"";
+    $program_query = mysql_query($query) or die (mysql_error());
+    while($row = mysql_fetch_array($program_query)){
+      $result.="{$row['measure']} - {$row['program']}<br>\n";
+    }
+    mysql_free_result($program_query);
+  }
+  return $result;
+}
+
+/*
  * Get Unexpected failing tests
  *
  * This is somewhat of a hack because from night 684 forward we now store the test 


Index: nightlytest-serverside/fulltest.php
diff -u nightlytest-serverside/fulltest.php:1.14 nightlytest-serverside/fulltest.php:1.15
--- nightlytest-serverside/fulltest.php:1.14	Fri Aug 18 13:52:08 2006
+++ nightlytest-serverside/fulltest.php	Mon Aug 21 15:21:55 2006
@@ -133,25 +133,34 @@
  *
  ******************************************************/
 $new_tests=getNewTests($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($new_tests,"")===0){
+  $new_tests="None";
+}
 $removed_tests=getRemovedTests($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($removed_tests,"")===0){
+  $removed_tests="None";
+}
 $newly_passing_tests=getFixedTests($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($newly_passing_tests,"")===0){
+  $newly_passing_tests="None";
+}
 $newly_failing_tests=getBrokenTests($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($newly_failing_tests,"")===0){
+  $newly_failing_tests="None";
+}
 
-if((strpos($new_tests, "none")!==FALSE &&
-   strpos($removed_tests, "none")!==FALSE &&
-   strpos($newly_passing_tests, "none")!==FALSE &&
-   strpos($newly_failing_tests, "none")!==FALSE ) ||
-   (strcmp($new_tests, "")==0 &&
-   strcmp($removed_tests, "")==0 &&
-   strcmp($newly_passing_tests, "")==0 &&
-   strcmp($newly_failing_tests, "")==0)){
-        $disp="none";
-        $sign="(-)";
+if(strpos($new_tests, "None")!==FALSE &&
+   strpos($removed_tests, "None")!==FALSE &&
+   strpos($newly_passing_tests, "None")!==FALSE &&
+   strpos($newly_failing_tests, "None")!==FALSE ){
+  $disp="none";
+  $sign="(-)";
 }
 else{
   $disp="";
   $sign="(+)";
 }
+
 print "<font size=\"-1\"><a href=\"javascript://\"onclick=\"toggleLayer('testSuite');\", id=\"testSuite_\">$sign Test Suite Changes</a></font>\n";
 print "<div id=\"testSuite\" style=\"display: $disp;\" class=\"hideable\">\n";
 print"<h3><u>Test suite changes:</u></h3>\n";
@@ -167,6 +176,24 @@
 
 /*****************************************************
  *
+ * Printing failures in test suite
+ *
+ ******************************************************/
+$failing_tests=getFailures($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($failing_tests,"")===0){
+  $newly_failing_tests="None";
+}
+$disp="none";
+$sign="(-)";
+print "<font size=\"-1\"><a href=\"javascript://\"onclick=\"toggleLayer('testSuiteFailures');\", id=\"testSuite_\">$sign Test Suite Failures</a></font>\n";
+print "<div id=\"testSuiteFailures\" style=\"display: $disp;\" class=\"hideable\">\n";
+print"<h3><u>Test suite failures:</u></h3>\n";
+print"<b>Failing tests:</b><br>\n";
+print "$failing_tests<br><br>\n";
+print "</div><br><br>\n";
+
+/*****************************************************
+ *
  * Dejagnu result go here
  *
  ******************************************************/
@@ -485,7 +512,7 @@
 $formatted_num=number_format($all_data['Total Sum'][0],0,".",",");
 print "<b>Total size</b>: $formatted_num bytes<br>\n";
 print "<b>Percent difference from previous test</b>: {$all_data['Total Sum'][1]}<br>\n";
-print "<b>Percent difference from five tests ago</b>: {$all_data['Total Sum'][2]}<br><br>\n";
+print "<b>Percent difference from five tests ago</b>: {$all_data['Total Sum'][3]}<br><br>\n";
 
 print "<table class=\"sortable\" id=\"file_sizes\" border=1 cellspacing=0 cellpadding=6>\n";
 print "\t<tr>\n";


Index: nightlytest-serverside/test.php
diff -u nightlytest-serverside/test.php:1.16 nightlytest-serverside/test.php:1.17
--- nightlytest-serverside/test.php:1.16	Thu Aug 17 22:50:18 2006
+++ nightlytest-serverside/test.php	Mon Aug 21 15:21:55 2006
@@ -149,18 +149,26 @@
  *
  ******************************************************/
 $new_tests=getNewTests($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($new_tests,"")===0){
+  $new_tests="None";
+}
 $removed_tests=getRemovedTests($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($removed_tests,"")===0){
+  $removed_tests="None";
+}
 $newly_passing_tests=getFixedTests($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($newly_passing_tests,"")===0){
+  $newly_passing_tests="None";
+}
 $newly_failing_tests=getBrokenTests($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($newly_failing_tests,"")===0){
+  $newly_failing_tests="None";
+}
 
-if((strpos($new_tests, "none")!==FALSE &&
-   strpos($removed_tests, "none")!==FALSE &&
-   strpos($newly_passing_tests, "none")!==FALSE &&
-   strpos($newly_failing_tests, "none")!==FALSE ) ||
-   (strcmp($new_tests, "")==0 &&
-   strcmp($removed_tests, "")==0 &&
-   strcmp($newly_passing_tests, "")==0 &&
-   strcmp($newly_failing_tests, "")==0)){
+if(strpos($new_tests, "None")!==FALSE &&
+   strpos($removed_tests, "None")!==FALSE &&
+   strpos($newly_passing_tests, "None")!==FALSE &&
+   strpos($newly_failing_tests, "None")!==FALSE ){
   $disp="none";
   $sign="(-)";
 }
@@ -183,6 +191,24 @@
 
 /*****************************************************
  *
+ * Printing failures in test suite
+ *
+ ******************************************************/
+$failing_tests=getFailures($night_id, $previous_succesful_id, $mysql_link);
+if(strcmp($failing_tests,"")===0){
+  $newly_failing_tests="None";
+}
+$disp="none";
+$sign="(-)";
+print "<font size=\"-1\"><a href=\"javascript://\"onclick=\"toggleLayer('testSuiteFailures');\", id=\"testSuite_\">$sign Test Suite Failures</a></font>\n";
+print "<div id=\"testSuiteFailures\" style=\"display: $disp;\" class=\"hideable\">\n";
+print"<h3><u>Test suite failures:</u></h3>\n";
+print"<b>Failing tests:</b><br>\n";
+print "$failing_tests<br><br>\n";
+print "</div><br><br>\n";
+
+/*****************************************************
+ *
  * Dejagnu result go here
  *
  ******************************************************/






More information about the llvm-commits mailing list