Changes in directory nightlytest-serverside:
ProgramResults.php updated: 1.55 -> 1.56 --- Log message: Trim excess path #1 --- Diffs of the changes: (+23 -11) ProgramResults.php | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.55 nightlytest-serverside/ProgramResults.php:1.56 --- nightlytest-serverside/ProgramResults.php:1.55 Mon Sep 11 13:55:20 2006 +++ nightlytest-serverside/ProgramResults.php Mon Sep 11 14:32:33 2006 @@ -411,13 +411,25 @@ return $result; } + + +/* + * Trim test path to exclude redundant info. + */ +function trimTestPath($program) { + list($head, $tail) = split("/llvm/test/", $program); + if (isset($tail)) { + $program = $tail; + } + return $program; +} /* * 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. + * in their own table as opposed in the night table. */ function getFailures($night_id) { $result=""; @@ -426,7 +438,7 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)) { $program = rtrim($row['program'], ": "); - $result .= $program . "\n"; + $result .= trimTestPath($program) . "\n"; } mysql_free_result($program_query); @@ -449,7 +461,7 @@ * Get Unexpected 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. + * in their own table as opposed in the night table. */ function getUnexpectedFailures($night_id){ $result=""; @@ -465,7 +477,7 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $program = rtrim($row['program'], ": "); - $result .= $program . "\n"; + $result .= trimTestPath($program) . "\n"; } mysql_free_result($program_query); } @@ -513,7 +525,7 @@ while ($row = mysql_fetch_array($program_query)) { $program = rtrim($row['program'], ": "); if (!isset($test_hash[$program])) { - $result .= $program . "\n"; + $result .= trimTestPath($program) . "\n"; } } mysql_free_result($program_query); @@ -527,7 +539,7 @@ * in their own table as opposed in the night table. */ function getNewTests($cur_id, $prev_id){ - if (strcmp($prev_id, "") === 0 || strcmp($cur_id, "") === 0) { + if (strlen($prev_id) === 0 || strlen($cur_id) === 0) { return ""; } @@ -555,7 +567,7 @@ * in their own table as opposed in the night table. */ function getRemovedTests($cur_id, $prev_id){ - if (strcmp($prev_id, "") === 0 || strcmp($cur_id, "") === 0) { + if (strlen($prev_id) === 0 || strlen($cur_id) === 0) { return ""; } @@ -622,7 +634,7 @@ $ispassing = isTestPass($row['result']); if ($wasfailing && $ispassing) { $reasons = getFailReasons($test_hash[$program]); - $result .= $program . $reasons . "\n"; + $result .= trimTestPath($program) . $reasons . "\n"; } } mysql_free_result($program_query); @@ -636,7 +648,7 @@ * in their own table as opposed in the night table. */ function getFixedTests($cur_id, $prev_id){ - if (strcmp($prev_id, "") === 0 || strcmp($cur_id, "") === 0) { + if (strlen($prev_id) === 0 || strlen($cur_id) === 0) { return ""; } @@ -661,10 +673,10 @@ * Get Broken 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. + * in their own table as opposed in the night table. */ function getBrokenTests($cur_id, $prev_id){ - if (strcmp($prev_id, "") === 0 || strcmp($cur_id, "") === 0) { + if (strlen($prev_id) === 0 || strlen($cur_id) === 0) { return ""; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits