<div dir="ltr"><div class="gmail_extra">Please review this patch. :)<br><div class="gmail_quote">On 7 June 2018 at 16:38, Vijay Kumar Banerjee <span dir="ltr"><<a href="mailto:vijaykumar9597@gmail.com" target="_blank">vijaykumar9597@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Close #3440<br>
---<br>
 tester/rt/coverage.py |  6 ++++--<br>
 tester/rt/test.py     | 15 ++++++++++-----<br>
 2 files changed, 14 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py<br>
index 54933d5..af24124 100644<br>
--- a/tester/rt/coverage.py<br>
+++ b/tester/rt/coverage.py<br>
@@ -163,7 +163,8 @@ class report_gen_html:<br>
             row += " <td>" + summary.branches_uncovered + "</td>"<br>
             row += " <td>" + summary.branches_total + "</td>"<br>
             row += " <td> {:.3%} </td>".format(summary.<wbr>percentage_branches_covered)<br>
-            row += ' <td><progress value="{:.3}" max="100"></progress></td>'.<wbr>format(100*summary.percentage_<wbr>branches_covered)<br>
+            row += ' <td><progress value="{:.3}" max="100"></progress></td>'\<br>
+                    .format(100*summary.<wbr>percentage_branches_covered)<br>
             row += "</tr>\n"<br>
         return row<br>
<br>
@@ -299,7 +300,8 @@ class covoar(object):<br>
         if (not path.exists(covoar_result_dir)<wbr>):<br>
             path.mkdir(covoar_result_dir)<br>
         if (not path.exists(symbol_file)):<br>
-            raise error.general('symbol set file: coverage %s was not created for covoar, skipping %s'% (symbol_file, set_name))<br>
+            raise error.general('symbol set file: %s was not '<br>
+                    'created for covoar, skipping %s'% (symbol_file, set_name))<br>
         command = ('covoar -S ' + symbol_file<br>
                   + ' -O ' + covoar_result_dir<br>
                   + ' -E ' + self.explanations_txt<br>
diff --git a/tester/rt/test.py b/tester/rt/test.py<br>
index 0e744cd..cdb5157 100644<br>
--- a/tester/rt/test.py<br>
+++ b/tester/rt/test.py<br>
@@ -232,7 +232,7 @@ def run(command_path = None):<br>
                     '--filter':         'Glob that executables must match to run (default: ' +<br>
                               default_exefilter + ')',<br>
                     '--stacktrace':     'Dump a stack trace on a user termination (^C)',<br>
-                    '--coverage':       'Perform coverage analysis of test executables.'}<br>
+                    '--coverage-sets':  'Perform coverage for specific sets'}<br>
         mailer.append_options(optargs)<br>
         opts = options.load(sys.argv,<br>
                             optargs = optargs,<br>
@@ -279,15 +279,20 @@ def run(command_path = None):<br>
         else:<br>
             rtems_tools = '%{_prefix}'<br>
         bsp = opts.find_arg('--rtems-bsp')<br>
+        if 'cov' in bsp[1].split('-'):<br>
+            coverage_enabled = True<br>
         if bsp is None or len(bsp) != 2:<br>
             raise error.general('RTEMS BSP not provided or an invalid option')<br>
         bsp = config.load(bsp[1], opts)<br>
         bsp_config = opts.defaults.expand(opts.<wbr>defaults['tester'])<br>
-        coverage_enabled = opts.find_arg('--coverage')<br>
+        coverage_sets = opts.find_arg('--coverage-<wbr>sets')<br>
         if coverage_enabled:<br>
-            if len(coverage_enabled) == 2:<br>
-                coverage_runner = coverage.coverage_run(opts.<wbr>defaults,<br>
-                                                coverage_enabled[1],<br>
+            if coverage_sets:<br>
+                if len(coverage_sets) != 2:<br>
+                    raise error.general('No sets provided in --coverage-sets')<br>
+                else :<br>
+                    coverage_runner = coverage.coverage_run(opts.<wbr>defaults,<br>
+                                                coverage_sets[1],<br>
                                                 executables)<br>
             else:<br>
                 coverage_runner = coverage.coverage_run(opts.<wbr>defaults, 0,<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.14.3<br>
<br>
</font></span></blockquote></div><br></div></div>