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

Jim Laskey jlaskey at apple.com
Sat Sep 16 17:54:24 PDT 2006



Changes in directory nightlytest-serverside:

ProgramResults.php updated: 1.66 -> 1.67
---
Log message:

Debugging #10

---
Diffs of the changes:  (+26 -21)

 ProgramResults.php |   47 ++++++++++++++++++++++++++---------------------
 1 files changed, 26 insertions(+), 21 deletions(-)


Index: nightlytest-serverside/ProgramResults.php
diff -u nightlytest-serverside/ProgramResults.php:1.66 nightlytest-serverside/ProgramResults.php:1.67
--- nightlytest-serverside/ProgramResults.php:1.66	Sat Sep 16 19:50:03 2006
+++ nightlytest-serverside/ProgramResults.php	Sat Sep 16 19:54:09 2006
@@ -436,8 +436,8 @@
     $query = "SELECT program FROM tests WHERE night=$night_id AND result=\"FAIL\" ORDER BY program ASC";
     $program_query = mysql_query($query) or die (mysql_error());
     while($row = mysql_fetch_assoc($program_query)) {
-      $program = rtrim($row['program'], ": ");
-      $result .= trimTestPath($program) . "\n";
+      $program = trimTestPath($row['program']);
+      $result .= $program . "\n";
     }
     mysql_free_result($program_query);
 
@@ -446,7 +446,7 @@
     while($row = mysql_fetch_assoc($program_query)) {
       $test_result = $row['result'];
       if (!isTestPass($test_result)) {
-        $program = rtrim($row['program'], ": ");
+        $program = trimTestPath($row['program']);
         $reasons = getFailReasons($test_result);        
         $result .= $program . $reasons . "\n";
       }
@@ -475,8 +475,8 @@
     $query = "SELECT program FROM tests WHERE night=$night_id AND result=\"FAIL\"";
     $program_query = mysql_query($query) or die (mysql_error());
     while($row = mysql_fetch_assoc($program_query)){
-      $program = rtrim($row['program'], ": ");
-      $result .= trimTestPath($program) . "\n";
+      $program = trimTestPath($row['program']);
+      $result .= $program . "\n";
     }
     mysql_free_result($program_query);
   }
@@ -504,7 +504,7 @@
   $query = "SELECT program, result FROM $table WHERE night=$id";
   $program_query = mysql_query($query) or die (mysql_error());
   while ($row = mysql_fetch_assoc($program_query)) {
-    $program = rtrim($row['program'], ": ");
+    $program = trimTestPath($row['program']);
     $test_hash[$program] = $row['result'];
   }
   mysql_free_result($program_query);
@@ -522,9 +522,9 @@
   $query = "SELECT program FROM $table WHERE night=$id ORDER BY program ASC";
   $program_query = mysql_query($query) or die (mysql_error());
   while ($row = mysql_fetch_assoc($program_query)) {
-    $program = rtrim($row['program'], ": ");
+    $program = trimTestPath($row['program']);
     if (!isset($test_hash[$program])) {
-      $result .= trimTestPath($program) . "\n";
+      $result .= $program . "\n";
     }
   }
   mysql_free_result($program_query);
@@ -591,11 +591,22 @@
  * Does the test pass
  *
  * Return true if the test result indicates a pass.  For "tests" the possible
- * conditions are "PASS", "FAIL" and "XFAIL" (expected to fail.)  For programs
- * an asterix appears by each tool that has failed.
+ * conditions are "PASS", "FAIL" and "XFAIL" (expected to fail.)
  */
 function isTestPass($test_result) {
-  return !(StringEqual($test_result, "FAIL") || strpos($test_result, "*") !== false);
+  return !(strcmp($test_result, "FAIL") == 0 || strpos($test_result, "*") !== false);
+}
+
+/*
+ * Merge program name and measure
+ */
+function MergeNameAndMeasureFromRow($row) {
+  $program = trimTestPath($row['program']);
+  $measure = $row['measure'];
+  if (strcmp($measure, "dejagnu") != 0) {
+    $program .= " [$measure]";
+  }
+  return $program;
 }
 
 /*
@@ -660,11 +671,8 @@
     $result = $row['newly_passing_tests'];
     mysql_free_result($program_query);
   } else {
-    $test_hash = getTestFailSet($prev_id, "tests");
-    $result .= getPassingTests($cur_id, "tests", $test_hash);
-  
-    $test_hash = getTestFailSet($prev_id, "program");
-    $result .= getPassingTests($cur_id, "program", $test_hash);
+    $test_hash = getTestFailSet($prev_id);
+    $result .= getPassingTests($cur_id, $test_hash);
   }
   return $result;
 }
@@ -688,11 +696,8 @@
     $result = $row['newly_failing_tests'];
     mysql_free_result($program_query);
   } else {
-    $test_hash = getTestFailSet($cur_id, "tests");
-    $result .= getPassingTests($prev_id, "tests", $test_hash);
-  
-    $test_hash = getTestFailSet($cur_id, "program");
-    $result .= getPassingTests($prev_id, "program", $test_hash);
+    $test_hash = getTestFailSet($cur_id);
+    $result .= getPassingTests($prev_id, $test_hash);
   }
   return $result;
 }






More information about the llvm-commits mailing list