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

Jim Laskey jlaskey at apple.com
Fri Sep 8 15:28:02 PDT 2006



Changes in directory nightlytest-serverside:

ProgramResults.php updated: 1.43 -> 1.44
fulltest.php updated: 1.18 -> 1.19
test.php updated: 1.21 -> 1.22
---
Log message:

reuse code for e-mail report #6

---
Diffs of the changes:  (+42 -12)

 ProgramResults.php |   38 ++++++++++++++++++++++++++++++++++----
 fulltest.php       |    8 ++++----
 test.php           |    8 ++++----
 3 files changed, 42 insertions(+), 12 deletions(-)


Index: nightlytest-serverside/ProgramResults.php
diff -u nightlytest-serverside/ProgramResults.php:1.43 nightlytest-serverside/ProgramResults.php:1.44
--- nightlytest-serverside/ProgramResults.php:1.43	Fri Sep  8 14:45:37 2006
+++ nightlytest-serverside/ProgramResults.php	Fri Sep  8 17:27:47 2006
@@ -523,7 +523,7 @@
  * This is somewhat of a hack because from night 684 forward we now store the test 
  * in their own table as opposed in the night table.
  */
-function getNewTests($cur_id, $prev_id, $mysql_link){
+function getNewTests($cur_id, $prev_id){
   if (strcmp($prev_id, "") === 0 || strcmp($cur_id, "") === 0) {
     return "";
   }
@@ -551,7 +551,7 @@
  * This is somewhat of a hack because from night 684 forward we now store the test 
  * in their own table as opposed in the night table.
  */
-function getRemovedTests($cur_id, $prev_id, $mysql_link){
+function getRemovedTests($cur_id, $prev_id){
   if (strcmp($prev_id, "") === 0 || strcmp($cur_id, "") === 0) {
     return "";
   }
@@ -631,7 +631,7 @@
  * This is somewhat of a hack because from night 684 forward we now store the test 
  * in their own table as opposed in the night table.
  */
-function getFixedTests($cur_id, $prev_id, $mysql_link){
+function getFixedTests($cur_id, $prev_id){
   if (strcmp($prev_id, "") === 0 || strcmp($cur_id, "") === 0) {
     return "";
   }
@@ -659,7 +659,7 @@
  * 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 getBrokenTests($cur_id, $prev_id, $mysql_link){
+function getBrokenTests($cur_id, $prev_id){
   if (strcmp($prev_id, "") === 0 || strcmp($cur_id, "") === 0) {
     return "";
   }
@@ -704,6 +704,36 @@
   return $prev_id;
 }
 
+/*
+ * Email report.
+ *
+ */
+function getEmailReport($cur_id, $prev_id) {
+  $added = getNewTests($cur_id, $prev_id);
+  $removed = getRemovedTests($cur_id, $prev_id);
+  $passing = getFixedTests($cur_id, $prev_id);
+  $failing = getBrokenTests($cur_id, $prev_id);
+  
+  $email = "";
+  if (strcmp($passing, "") == 0) {
+    $passing = "None";
+  } 
+  $email .= "\nNew Test Passes:\n$passing\n";
+  if (strcmp($failing, "") == 0) {
+    $failing = "None";
+  } 
+  $email .= "\nNew Test Failures:\n$failing\n";
+  if (strcmp($added, "") == 0) {
+    $added = "None";
+  } 
+  $email .= "\nAdded Tests:\n$added\n";
+  if (strcmp($removed, "") == 0) {
+    $removed = "None";
+  } 
+  $email .= "\nRemoved Tests:\n$removed\n";
+  
+  return $email;
+}
 
 
 /*$programs=array("Benchmarks/CoyoteBench/huffbench","Benchmarks/CoyoteBench/lpbench");


Index: nightlytest-serverside/fulltest.php
diff -u nightlytest-serverside/fulltest.php:1.18 nightlytest-serverside/fulltest.php:1.19
--- nightlytest-serverside/fulltest.php:1.18	Fri Sep  8 14:45:37 2006
+++ nightlytest-serverside/fulltest.php	Fri Sep  8 17:27:47 2006
@@ -132,19 +132,19 @@
  * Printing changes in test suite
  *
  ******************************************************/
-$new_tests=htmlifyTestResults(getNewTests($night_id, $previous_succesful_id, $mysql_link));
+$new_tests=htmlifyTestResults(getNewTests($night_id, $previous_succesful_id));
 if(strcmp($new_tests,"")===0){
   $new_tests="None";
 }
-$removed_tests=htmlifyTestResults(getRemovedTests($night_id, $previous_succesful_id, $mysql_link));
+$removed_tests=htmlifyTestResults(getRemovedTests($night_id, $previous_succesful_id));
 if(strcmp($removed_tests,"")===0){
   $removed_tests="None";
 }
-$newly_passing_tests=htmlifyTestResults(getFixedTests($night_id, $previous_succesful_id, $mysql_link));
+$newly_passing_tests=htmlifyTestResults(getFixedTests($night_id, $previous_succesful_id));
 if(strcmp($newly_passing_tests,"")===0){
   $newly_passing_tests="None";
 }
-$newly_failing_tests=htmlifyTestResults(getBrokenTests($night_id, $previous_succesful_id, $mysql_link));
+$newly_failing_tests=htmlifyTestResults(getBrokenTests($night_id, $previous_succesful_id));
 if(strcmp($newly_failing_tests,"")===0){
   $newly_failing_tests="None";
 }


Index: nightlytest-serverside/test.php
diff -u nightlytest-serverside/test.php:1.21 nightlytest-serverside/test.php:1.22
--- nightlytest-serverside/test.php:1.21	Fri Sep  8 14:47:51 2006
+++ nightlytest-serverside/test.php	Fri Sep  8 17:27:47 2006
@@ -144,19 +144,19 @@
  * Printing changes in test suite
  *
  ******************************************************/
-$new_tests=htmlifyTestResults(getNewTests($night_id, $previous_succesful_id, $mysql_link));
+$new_tests=htmlifyTestResults(getNewTests($night_id, $previous_succesful_id));
 if(strcmp($new_tests,"")===0){
   $new_tests="None";
 }
-$removed_tests=htmlifyTestResults(getRemovedTests($night_id, $previous_succesful_id, $mysql_link));
+$removed_tests=htmlifyTestResults(getRemovedTests($night_id, $previous_succesful_id));
 if(strcmp($removed_tests,"")===0){
   $removed_tests="None";
 }
-$newly_passing_tests=htmlifyTestResults(getFixedTests($night_id, $previous_succesful_id, $mysql_link));
+$newly_passing_tests=htmlifyTestResults(getFixedTests($night_id, $previous_succesful_id));
 if(strcmp($newly_passing_tests,"")===0){
   $newly_passing_tests="None";
 }
-$newly_failing_tests=htmlifyTestResults(getBrokenTests($night_id, $previous_succesful_id, $mysql_link));
+$newly_failing_tests=htmlifyTestResults(getBrokenTests($night_id, $previous_succesful_id));
 if(strcmp($newly_failing_tests,"")===0){
   $newly_failing_tests="None";
 }






More information about the llvm-commits mailing list