|
From: Sebastien D. <sde...@us...> - 2005-07-04 09:48:17
|
Update of /cvsroot/tslogparser/tslogparser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31672 Modified Files: HISTORY report.php Log Message: fix Index: report.php =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/report.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- report.php 29 Jun 2005 14:37:30 -0000 1.6 +++ report.php 4 Jul 2005 09:48:09 -0000 1.7 @@ -228,9 +228,9 @@ $tmpres=""; $diff=0; $count = 0; - foreach ($assertsdata as $assert_id => $desc_data) - foreach ($desc_data as $desc_id => $run_data) - foreach ($run_data as $run_name => $detail) + foreach ($assertsdata as $assert_id => $run_data) + foreach ($run_data as $descr_id => $descr_data) + foreach ($descr_data as $run_name => $detail) { $count++; if (!$tmpres) @@ -241,18 +241,20 @@ if ((!$diff) && ($count == count($runs))) { - foreach ($assertsdata as $assert_id => $desc_data) - foreach ($desc_data as $desc_id => $run_data) - { - unset ($data[$routine][$testname][$assert_id][$desc_id]); // No difference in this testcase - $displayed--; - // we cascade-delete the empty tree branchs - if (!$data[$routine][$testname][$assert_id]) unset($data[$routine][$testname][$assert_id]); - if (!$data[$routine][$testname]) unset($data[$routine][$testname]); - if (!$data[$routine]) unset($data[$routine]); - if (!$data) - die("The runs are identical -- aborted"); - } + foreach ($assertsdata as $assert_id => $run_data) + foreach ($run_data as $desc_id => $descr_data) + foreach ($descr_data as $run_name => $detail) + { + unset ($data[$routine][$testname][$assert_id][$desc_id][$run_name]); // No difference in this testcase + $displayed--; + // we cascade-delete the empty tree branchs + if (!$data[$routine][$testname][$assert_id][$desc_id]) unset($data[$routine][$testname][$assert_id][$desc_id]); + if (!$data[$routine][$testname][$assert_id]) unset($data[$routine][$testname][$assert_id]); + if (!$data[$routine][$testname]) unset($data[$routine][$testname]); + if (!$data[$routine]) unset($data[$routine]); + if (!$data) + die("The runs are identical -- aborted"); + } } } } @@ -359,96 +361,101 @@ echo " <td><b>Assertion detail</b></td>\n"; echo " </tr>\n"; +//echo "<pre>"; +//print_r($data); +//echo "</pre>"; + + /* Display results */ -$anomalies=0; foreach ($data as $routine => $rou_data) { echo " <tr>\n"; echo " <td"; $count=0; - foreach($rou_data as $test_data) - $count += count($test_data); + foreach($rou_data as $file_data) + $count += count($file_data); if ($count > 1) echo " rowspan='".$count."'"; echo ">".stringFromDB($routine)."</td>\n"; $first=1; - $anomalie=0; - foreach ($rou_data as $testcase => $test_data) + foreach ($rou_data as $file => $file_data) { - $test_first=1; - if (!$first) echo " <tr>\n"; - if ($test_first) - { - echo " <td"; - if (count($test_data) > 1) - echo " rowspan=".count($test_data); - echo ">".stringFromDB($testcase).($anomalie?" (*)":"")."</td>\n"; - } + + echo " <td"; + if (count($file_data) > 1) + echo " rowspan=".count($file_data); + echo ">".stringFromDB($file)."</td>\n"; - foreach ($test_data as $assert_id => $assert_data) + $assert_first=1; + $countTC = count($file_data); + + foreach ($file_data as $assert_id => $assert_data) { - $assert_first=1; - $countTC = count($assert_data); - if ($countTC > 1) - { - $anomalie=1; - $anomalies++; - } - foreach ($assert_data as $testid => $run_data) + if (!$assert_first) + echo " <tr>\n"; + + + foreach ($runs as $run => $run_data_bis) { - foreach ($runs as $run => $run_data_bis) + echo " <td>"; + /* If an $assert_data[$test_id][$run] is set, we put it here, + otherwise we put a blank case */ + $key=null; + foreach ($assert_data as $test_id => $test_data) + if (array_key_exists($run, $test_data)) + { + $key = $test_id; + break; + } + + if (!$key) + echo " "; + else { - echo " <td>"; - if (!isset($run_data[$run])) - echo " "; - else + $font=0; + echo "<a href=\"detailed.php?run_id=".$run_data_bis["id"]."&testcase_id=".$key."\">"; + if (ereg("(PASS|SKIP)", $assert_data[$key][$run]["status"])) { - $font=0; - echo "<a href=\"detailed.php?run_id=".$run_data_bis["id"]."&testcase_id=".$testid."\">"; - if (ereg("(PASS|SKIP)", $run_data[$run]["status"])) - { - echo "<font color='green'>"; - $font=1; - } - if (ereg("(FAIL|INTERRUPTED|HUNG)", $run_data[$run]["status"])) - { - echo "<font color='red'>"; - $font=1; - } - if (ereg("(UNRESOLVED)", $run_data[$run]["status"])) - { - echo "<font color='orange'>"; - $font=1; - } - if (ereg("(UNSUPPORTED|UNTESTED)", $run_data[$run]["status"])) - { - echo "<font color='black'>"; - $font=1; - } - echo stringFromDB($run_data[$run]["status"]); - if ((!isset($_POST["logs"])) && $run_data[$run]["log"]) - echo " (log)"; - if ($font) echo "</font>"; - echo "</a>"; + echo "<font color='green'>"; + $font=1; } - echo "</td>\n"; - if (isset($_POST["logs"])) + if (ereg("(FAIL|INTERRUPTED|HUNG)", $assert_data[$key][$run]["status"])) { - echo " <td><pre>"; - echo strip_tags(stringFromDB($run_data[$run]["log"])); - echo " </pre></td>\n"; + echo "<font color='red'>"; + $font=1; } + if (ereg("(UNRESOLVED)", $assert_data[$key][$run]["status"])) + { + echo "<font color='orange'>"; + $font=1; + } + if (ereg("(UNSUPPORTED|UNTESTED)", $assert_data[$key][$run]["status"])) + { + echo "<font color='black'>"; + $font=1; + } + echo stringFromDB($assert_data[$key][$run]["status"]); + if ((!isset($_POST["logs"])) && $assert_data[$key][$run]["log"]) + echo " (log)"; + if ($font) echo "</font>"; + echo "</a>"; } - if (isset($_POST["asserts"]) && $assert_first) - echo " <td".($countTC>1?" rowspan=$countTC":"")."><pre>".strip_tags(stringFromDB(wordwrap($asserts[$routine][$assert_id])))."</pre></td>\n"; - echo " </tr>\n"; - $first=0; - $assert_first=0; - $test_first=0; } + echo "</td>\n"; + if (isset($_POST["logs"])) + { + echo " <td><pre>"; + echo strip_tags(stringFromDB($assert_data[$key][$run]["log"])); + echo " </pre></td>\n"; + } + if (isset($_POST["asserts"]) && $assert_first) + echo " <td".($countTC>1?" rowspan=$countTC":"")."><pre>".strip_tags(stringFromDB(wordwrap($asserts[$routine][$assert_id])))."</pre></td>\n"; + echo " </tr>\n"; + $assert_first=0; } + $first=0; } } echo " </table>\n"; Index: HISTORY =================================================================== RCS file: /cvsroot/tslogparser/tslogparser/HISTORY,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- HISTORY 29 Jun 2005 14:37:30 -0000 1.29 +++ HISTORY 4 Jul 2005 09:48:09 -0000 1.30 @@ -1,3 +1,6 @@ +2005-07-04: +- Fix in report.php for comparison between different releases. + 2005-06-29: - Mods in run-browse.php and report.php to allow comparison between several test suite releases. This has to be tested with the OPTS |