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

Jim Laskey jlaskey at apple.com
Sat Sep 16 17:34:02 PDT 2006



Changes in directory nightlytest-serverside:

ProgramResults.php updated: 1.61 -> 1.62
---
Log message:

Debugging #5

---
Diffs of the changes:  (+15 -11)

 ProgramResults.php |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)


Index: nightlytest-serverside/ProgramResults.php
diff -u nightlytest-serverside/ProgramResults.php:1.61 nightlytest-serverside/ProgramResults.php:1.62
--- nightlytest-serverside/ProgramResults.php:1.61	Sat Sep 16 19:21:19 2006
+++ nightlytest-serverside/ProgramResults.php	Sat Sep 16 19:33:48 2006
@@ -594,7 +594,19 @@
  * conditions are "PASS", "FAIL" and "XFAIL" (expected to fail.)
  */
 function isTestPass($test_result) {
-  return strcmp($test_result, "FAIL") != 0;
+  return !StringEqual($test_result, "FAIL");
+}
+
+/*
+ * Merge program name and measure
+ */
+function MergeNameAndMeasureFromRow($row) {
+  $program = trimTestPath($row['program']);
+  $measure = $row['measure'];
+  if (!StringEqual($measure, "dejagnu")) {
+    $program .= " [$measure]";
+  }
+  return $program;
 }
 
 /*
@@ -609,11 +621,7 @@
   while ($row = mysql_fetch_assoc($program_query)) {
     $result = $row['result'];
     if (!isTestPass($result)) {
-      $program = trimTestPath($row['program']);
-      $measure = $row['measure'];
-      if (!StringEqual($measure, "dejagnu")) {
-        $program .= " [$measure]";
-      }
+      $program = MergeNameAndMeasureFromRow($row);
       $test_hash[$program] = $result;
     }
   }
@@ -632,11 +640,7 @@
   $query = "SELECT program, result, measure FROM tests WHERE night=$id ORDER BY program ASC, measure ASC";
   $program_query = mysql_query($query) or die (mysql_error());
   while ($row = mysql_fetch_assoc($program_query)) {
-    $program = trimTestPath($row['program']);
-    $measure = $row['measure'];
-    if (!StringEqual($measure, "dejagnu")) {
-      $program .= " [$measure]";
-    }
+    $program = MergeNameAndMeasureFromRow($row);
     $result = $row['result'];
     $wasfailing = isset($test_hash[$program]);
     $ispassing = isTestPass($result);






More information about the llvm-commits mailing list