<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 10 July 2018 at 20:47, Gedare Bloom <span dir="ltr"><<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't see any problem with it, but I prefer to let Chris decide on merging...<br>
<br></blockquote><div>Thank you for the feedback :) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Jul 10, 2018 at 8:11 AM, Vijay Kumar Banerjee<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:vijaykumar9597@gmail.com">vijaykumar9597@gmail.com</a>> wrote:<br>
> ping :)<br>
><br>
> On 6 July 2018 at 02:08, Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com">vijaykumar9597@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hello Chris,<br>
>><br>
>> If you find some time, please review this patch.<br>
>> It's a small patch but it's important since it affects how the command<br>
>> will look like.<br>
>><br>
>> please review if this patch is alright or we need to have a different<br>
>> approach.<br>
>><br>
>> Thanks<br>
>> On 3 July 2018 at 20:30, Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com">vijaykumar9597@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Close #3440<br>
>>> ---<br>
>>>  tester/rt/test.py                            | 21 ++++++++++++++-------<br>
>>>  tester/rtems/testing/bsps/<wbr>leon3-qemu-cov.ini |  1 +<br>
>>>  2 files changed, 15 insertions(+), 7 deletions(-)<br>
>>><br>
>>> diff --git a/tester/rt/test.py b/tester/rt/test.py<br>
>>> index 9214ad6..5d25d82 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<br>
>>> match to run (default: ' +<br>
>>>                                default_exefilter + ')',<br>
>>>                      '--stacktrace':     'Dump a stack trace on a user<br>
>>> termination (^C)',<br>
>>> -                    '--coverage':       'Perform coverage analysis of<br>
>>> test executables.'}<br>
>>> +                    '--coverage-sets':  'Perform coverage analysis for<br>
>>> specific sets.'}<br>
>>>          mailer.append_options(optargs)<br>
>>>          opts = options.load(sys.argv,<br>
>>>                              optargs = optargs,<br>
>>> @@ -283,14 +283,21 @@ def run(command_path = None):<br>
>>>              raise error.general('RTEMS BSP not provided or an invalid<br>
>>> 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>
>>> +        try:<br>
>>> +            coverage_enabled = opts.defaults.get('coverage')<br>
>>> +        except:<br>
>>> +            coverage_enabled = False<br>
>>>          if coverage_enabled:<br>
>>>              cov_trace = 'cov' in debug_trace.split(',')<br>
>>> -            if len(coverage_enabled) == 2:<br>
>>> -                coverage_runner = coverage.coverage_run(opts.<wbr>defaults,<br>
>>> -                                                        executables,<br>
>>> -                                                        symbol_set =<br>
>>> coverage_enabled[1],<br>
>>> -                                                        trace =<br>
>>> cov_trace)<br>
>>> +            if coverage_sets:<br>
>>> +                if len(coverage_sets) != 2:<br>
>>> +                    raise error.general('No sets provided in<br>
>>> --coverage-sets')<br>
>>> +                else:<br>
>>> +                    coverage_runner =<br>
>>> coverage.coverage_run(opts.<wbr>defaults,<br>
>>> +                                                            executables,<br>
>>> +                                                            symbol_set =<br>
>>> coverage_sets[1],<br>
>>> +                                                            trace =<br>
>>> cov_trace)<br>
>>>              else:<br>
>>>                  coverage_runner = coverage.coverage_run(opts.<wbr>defaults,<br>
>>>                                                          executables,<br>
>>> diff --git a/tester/rtems/testing/bsps/<wbr>leon3-qemu-cov.ini<br>
>>> b/tester/rtems/testing/bsps/<wbr>leon3-qemu-cov.ini<br>
>>> index 2f89117..6462448 100644<br>
>>> --- a/tester/rtems/testing/bsps/<wbr>leon3-qemu-cov.ini<br>
>>> +++ b/tester/rtems/testing/bsps/<wbr>leon3-qemu-cov.ini<br>
>>> @@ -38,3 +38,4 @@ target            = sparc-rtems5<br>
>>>  tester            = %{_rtscripts}/qemu.cfg<br>
>>>  bsp_qemu_opts     = %{qemu_opts_base} -M leon3_generic<br>
>>>  bsp_qemu_cov_opts = -exec-trace %{test_executable}.cov<br>
>>> +coverage          = True<br>
>>> --<br>
>>> 2.14.4<br>
>>><br>
>><br>
><br>
</div></div></blockquote></div><br></div></div>