[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Jim Laskey
jlaskey at apple.com
Sun Sep 17 02:58:37 PDT 2006
Changes in directory nightlytest-serverside:
ProgramResults.php updated: 1.80 -> 1.81
---
Log message:
simplify select
---
Diffs of the changes: (+15 -19)
ProgramResults.php | 34 +++++++++++++++-------------------
1 files changed, 15 insertions(+), 19 deletions(-)
Index: nightlytest-serverside/ProgramResults.php
diff -u nightlytest-serverside/ProgramResults.php:1.80 nightlytest-serverside/ProgramResults.php:1.81
--- nightlytest-serverside/ProgramResults.php:1.80 Sat Sep 16 20:46:57 2006
+++ nightlytest-serverside/ProgramResults.php Sun Sep 17 04:58:16 2006
@@ -604,20 +604,18 @@
*/
function getTestFailSet($id) {
$test_hash = array();
- $query = "SELECT program, result, measure FROM tests WHERE night=$id ORDER BY program ASC, measure ASC";
+ $query = "SELECT program, result, measure FROM tests WHERE night=$id AND result=\"FAIL\" ORDER BY program ASC, measure ASC";
$program_query = mysql_query($query) or die (mysql_error());
while ($row = mysql_fetch_assoc($program_query)) {
- if (!isTestPass($row['result'])) {
- $program = trimTestPath($row['program']);
- $measure = strtoupper($row['measure']);
- $result = $test_hash[$program];
- if (isset($result)) {
- $result .= ", " . $measure;
- } else {
- $result = $measure;
- }
- $test_hash[$program] = $result;
+ $program = trimTestPath($row['program']);
+ $measure = strtoupper($row['measure']);
+ $result = $test_hash[$program];
+ if (isset($result)) {
+ $result .= ", " . $measure;
+ } else {
+ $result = $measure;
}
+ $test_hash[$program] = $result;
}
mysql_free_result($program_query);
return $test_hash;
@@ -631,16 +629,14 @@
*/
function getPassingTests($id, $test_hash) {
$passing = "";
- $query = "SELECT program, result, measure FROM tests WHERE night=$id ORDER BY program ASC, measure ASC";
+ $query = "SELECT program, result, measure FROM tests WHERE night=$id AND result<>\"FAIL\" ORDER BY program ASC, measure ASC";
$program_query = mysql_query($query) or die (mysql_error());
while ($row = mysql_fetch_assoc($program_query)) {
- if (isTestPass($row['result'])) {
- $program = trimTestPath($row['program']);
- $measure = strtoupper($row['measure']);
- $result = $test_hash[$program];
- if (strpos("$result", $measure) !== false) {
- $passing .= "$program [$measure]\n";
- }
+ $program = trimTestPath($row['program']);
+ $measure = strtoupper($row['measure']);
+ $result = $test_hash[$program];
+ if (strpos("$result", $measure) !== false) {
+ $passing .= "$program [$measure]\n";
}
}
mysql_free_result($program_query);
More information about the llvm-commits
mailing list