Changes in directory nightlytest-serverside:
ProgramResults.php updated: 1.34 -> 1.35 --- Log message: Adding reasons to newly passing/failing step #1. --- Diffs of the changes: (+31 -17) ProgramResults.php | 48 +++++++++++++++++++++++++++++++----------------- 1 files changed, 31 insertions(+), 17 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.34 nightlytest-serverside/ProgramResults.php:1.35 --- nightlytest-serverside/ProgramResults.php:1.34 Fri Sep 1 05:53:35 2006 +++ nightlytest-serverside/ProgramResults.php Fri Sep 8 06:26:54 2006 @@ -387,6 +387,33 @@ } } + +/* + * Return reason why a llvm test failed. + */ +function getFailReasons($test_result) { + $result = ""; + $phases = split(", ", $test_result); + + for ($i = 0; $i < count($phases); $i++) { + $phase = $phases[$i]; + if (strpos($phase, "*") !== false) { + list($tool, $tool_result) = split(": ", $phase); + if (strcmp($result, "") != 0) { + $result .= ", "; + } + $result .= $tool; + } + } + + if (strcmp($result, "") != 0) { + $result = " [" . $result . "]"; + } + + return $result; +} + + /* * Get failing tests * @@ -408,21 +435,8 @@ while($row = mysql_fetch_array($program_query)) { $test_result = $row['result']; if (!isTestPass($test_result)) { - $failing_tools = ""; - $phases = split(", ", $test_result); - - for ($i = 0; $i < count($phases); $i++) { - $phase = $phases[$i]; - if (!isTestPass($phase)) { - list($tool, $tool_result) = split(": ", $phase); - if (strcmp($failing_tools, "") != 0) { - $failing_tools .= ", "; - } - $failing_tools .= $tool; - } - } - - $result .= "{$row['program']} [{$failing_tools}]<br>\n"; + $reasons = getFailReasons($test_result); + $result .= "{$row['program']}{$reasons}<br>\n"; } } mysql_free_result($program_query); @@ -467,7 +481,7 @@ $query = "SELECT * FROM $table WHERE night=$id"; $program_query = mysql_query($query) or die (mysql_error()); while ($row = mysql_fetch_array($program_query)) { - $test_hash[$row['program']]=1; + $test_hash[$row['program']] = $row['result']; } mysql_free_result($program_query); return $test_hash; @@ -575,7 +589,7 @@ $program_query = mysql_query($query) or die (mysql_error()); while ($row = mysql_fetch_array($program_query)) { if (!isTestPass($row['result'])) { - $test_hash[$row['program']]=1; + $test_hash[$row['program']] = $row['result']; } } mysql_free_result($program_query); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits