Hi, my first patch to this list.  Actually not a patch,
but the files themselves, to avoid line-wrapping issues
and because the diff is twice the size of the new file.

-Marc


-----------
Detect test results more accurately when generating HTML

Process test output lines that appear between <<<test_end>>>
and the following <<<test_start>>>.  Assign to the preceding
test where the name matches, else to the following test.

If a single test has multiple types of results (e.g. both
FAIL and WARN), report only the most significant one, to
avoid mis-computing the total number of PASS tests or
total counts that don't add up to the number of tests.

If a test's output has no explicit result (PASS, FAIL, etc),
look at the exit value to determine whether it passed.

Setting the SHOW_UNRESOLVED environment variable to 1
classifies as UNRESOLVED any test with no explicit result
and a zero exit code.

Setting the SUMMARY_OUTPUT environment variable to 1
causes only one line of output per test to be shown, for a
tighter page that allows quickly scanning the results.

Show percentage of each result type in summary section.

Simplify parsing a bit.

Signed-off-by:  Marc Gauthier <[email protected]>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en-US">
<head>
  <title>Linux Test Project - Results</title>
</head>
<body>

<h1>LTP Output/Log </h1>
<table border="1" cellspacing="3">
  <tbody>
    <tr>
      <td bgcolor="#66ff66"><b>&nbsp;PASSED&nbsp;</b></td>
      <td bgcolor="#ff0000"><b>&nbsp;FAILED&nbsp;</b></td>
      <td bgcolor="Fuchsia"><b>&nbsp;WARNING&nbsp;</b></td>
      <td bgcolor="Yellow"><b>&nbsp;BROKEN&nbsp;</b></td>
      <td bgcolor="#8dc997"><b>&nbsp;RETIRED&nbsp;</b></td>
      <td bgcolor="Aqua"><b>&nbsp;CONFIG-ERROR&nbsp;</b></td>
      <td bgcolor="#c0c0ff"><b>&nbsp;UNRESOLVED&nbsp;</b></td>
    </tr>
  </tbody>
</table>
<br>
<b>Meaning of the following KEYWORDS in test results/logs:</b>
<hr>
<li><b>PASS -</b> Indicates that the test case had the expected result and 
passed</li>
<li><b>FAIL -</b> Indicates that the test case had an unexpected result and 
failed.</li>
<li><b>BROK -</b> Indicates that the remaining test cases are broken and will 
not execute correctly, because some precondition not met, such as a resource 
not being available.</li>
<li><b>CONF -</b> Indicates that the test case was not written to run on the 
current harware or software configuration such as machine type, or, kernel 
version.</li>
<li><b>RETR -</b> Indicates that the test cases has been retired and should not 
be executed any longer.</li>
<li><b>WARN -</b> Indicates that the test case experienced an unexpected or 
undesirable event that should not affect the test itself such as being unable 
to cleanup resources after the test finished.</li>
<li><b>INFO -</b> Specifies useful information about the status of the test 
that does not affect the result and does not indicate a problem.</li>
<hr>

<br>
<li><a href="#_1">Click Here for Detailed Report</a></li>
<li><a href="#_2">Click Here for Summary Report</a></li>
<br>

<h2 id="_1">Detailed Report</h2>
<div>
<table border="1" cellspacing="3"> 
<tbody>
    <tr>
      <td bgcolor="Silver"><strong>No</strong></td>
      <td bgcolor="Silver"><strong>Test-Name</strong></td>
      <td bgcolor="Silver"><strong>Start-Time</strong></td>
      <td bgcolor="Silver"><strong>Command-Line</strong></td>
      <td bgcolor="Silver"><strong>Contacts</strong></td>
      <td bgcolor="Silver"><strong>Analysis</strong></td>
      <td bgcolor="Silver"><strong>Initiation-Status</strong></td>
      <td bgcolor="Silver"><strong>Test-Output</strong></td>
      <td bgcolor="Silver"><strong>Duration</strong></td>
      <td bgcolor="Silver"><strong>Termination-type</strong></td>
      <td bgcolor="Silver"><strong>Termination-id</strong></td>
      <td bgcolor="Silver"><strong>Core-File</strong></td>
      <td bgcolor="Silver"><strong>cutime</strong></td>
      <td bgcolor="Silver"><strong>cstime</strong></td>
    </tr>

Attachment: genhtml.pl
Description: genhtml.pl

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to