diff options
author | Alex White <alex.white@oarcorp.com> | 2021-02-25 10:35:39 -0600 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2021-03-30 13:15:58 -0500 |
commit | 4aabd9bbf742f04a53331064dc0692b91d4d3a6c (patch) | |
tree | 09846f0dcf54fdfd69af43b5685b8b3e0ddd8d21 /tester/rt | |
parent | covoar: Handle periods in symbols from objdump (diff) | |
download | rtems-tools-4aabd9bbf742f04a53331064dc0692b91d4d3a6c.tar.bz2 |
covoar/reports: Add new statistics to summary
The following new statistics have been added to the summary report:
number of unreferenced symbols, total branch paths found, number of
branch paths not executed, and percentage of branch paths covered.
Diffstat (limited to 'tester/rt')
-rw-r--r-- | tester/rt/coverage.py | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py index e2a5161..8d176c3 100644 --- a/tester/rt/coverage.py +++ b/tester/rt/coverage.py @@ -56,6 +56,7 @@ class summary: self.bytes_not_executed = 0 self.percentage_executed = 0.0 self.percentage_not_executed = 100.0 + self.unreferenced_symbols = 0 self.ranges_uncovered = 0 self.branches_uncovered = 0 self.branches_total = 0 @@ -74,7 +75,10 @@ class summary: self.bytes_not_executed = self._get_next_with_colon(summary_file) self.percentage_executed = self._get_next_with_colon(summary_file) self.percentage_not_executed = self._get_next_with_colon(summary_file) + self.unreferenced_symbols = self._get_next_with_colon(summary_file) self.ranges_uncovered = self._get_next_with_colon(summary_file) + summary_file.readline() + summary_file.readline() self.branches_total = self._get_next_with_colon(summary_file) self.branches_uncovered = self._get_next_with_colon(summary_file) self.branches_always_taken = self._get_next_without_colon(summary_file) @@ -153,6 +157,7 @@ class report_gen_html: + '</td>' + os.linesep row += ' <td>' + summary.bytes_analyzed + '</td>' + os.linesep row += ' <td>' + summary.bytes_not_executed + '</td>' + os.linesep + row += ' <td>' + summary.unreferenced_symbols + '</td>' + os.linesep row += ' <td>' + summary.ranges_uncovered + '</td>' + os.linesep row += ' <td>' + summary.percentage_executed + '%</td>' + os.linesep row += ' <td>' + summary.percentage_not_executed + '%</td>' + os.linesep @@ -168,19 +173,21 @@ class report_gen_html: def _header_row(self): row = "<tr>" + os.linesep - row += " <th> Symbols set name </th>" + os.linesep - row += " <th> Index file </th>" + os.linesep - row += " <th> Summary file </th>" + os.linesep - row += " <th> Bytes analyzed </th>" + os.linesep - row += " <th> Bytes not executed </th>" + os.linesep - row += " <th> Uncovered ranges </th>" + os.linesep - row += " <th> Percentage covered </th>" + os.linesep - row += " <th> Percentage uncovered </th>" + os.linesep - row += " <th> Instruction coverage </th>" + os.linesep - row += " <th> Branches uncovered </th>" + os.linesep - row += " <th> Branches total </th>" + os.linesep - row += " <th> Branches covered percentage </th>" + os.linesep - row += " <th> Branches coverage </th>" + os.linesep + rowAttributes = "class=\"table-sortable:default table-sortable\" title=\"Click to sort\"" + row += " <th " + rowAttributes + "> Symbols set name </th>" + os.linesep + row += " <th " + rowAttributes + "> Index file </th>" + os.linesep + row += " <th " + rowAttributes + "> Summary file </th>" + os.linesep + row += " <th " + rowAttributes + "> Bytes analyzed </th>" + os.linesep + row += " <th " + rowAttributes + "> Bytes not executed </th>" + os.linesep + row += " <th " + rowAttributes + "> Unreferenced symbols </th>" + os.linesep + row += " <th " + rowAttributes + "> Uncovered ranges </th>" + os.linesep + row += " <th " + rowAttributes + "> Percentage covered </th>" + os.linesep + row += " <th " + rowAttributes + "> Percentage uncovered </th>" + os.linesep + row += " <th " + rowAttributes + "> Instruction coverage </th>" + os.linesep + row += " <th " + rowAttributes + "> Branches uncovered </th>" + os.linesep + row += " <th " + rowAttributes + "> Branches total </th>" + os.linesep + row += " <th " + rowAttributes + "> Branches covered percentage </th>" + os.linesep + row += " <th " + rowAttributes + "> Branch coverage </th>" + os.linesep row += "</tr>" self.number_of_columns = row.count('<th>') return row |