[PATCH] Coverage: Add support for TSIM format

Vijay Kumar Banerjee vijaykumar9597 at gmail.com
Wed Feb 6 08:24:12 UTC 2019


On Wed, 6 Feb 2019 at 02:35, Chris Johns <chrisj at rtems.org> wrote:

> On 6/2/19 1:41 am, Vijay Kumar Banerjee wrote:
> > On Tue, 5 Feb 2019 at 03:37, Chris Johns <chrisj at rtems.org
> > <mailto:chrisj at rtems.org>> wrote:
>      On 1/2/19 10:47 pm, Vijay Kumar Banerjee wrote:
> >     >          self.trace = trace
> >     >          self.prefix = prefix
> >     > +        self.bsp = bsp
> >     >
> >     >      def _find_covoar(self):
> >     >          covoar_exe = 'covoar'
> >     > @@ -316,10 +323,18 @@ class covoar(object):
> >     >          if not path.exists(symbol_file):
> >     >              raise error.general('coverage: no symbol set file:
> %s'%
> >     (symbol_file))
> >     >          exe = self._find_covoar()
> >     > -        command = exe + ' -S ' + symbol_file + \
> >     > -                  ' -O ' + covoar_result_dir + \
> >     > -                  ' -E ' + self.explanations_txt + \
> >     > -                  ' -p ' + self.project_name + ' ' +
> self.executables
> >     > +        if 'qemu' in self.bsp.split('-'):
> >
> >     Are you checking for 'qemu' in the BSP name? The naming used here is
> a
> >     convention and making the code depend on a naming convention is
> fragile. Lets
> >     not do this.
> >
> >     There is a `%{qemu-cmd}` macro defined which must exist for a qemu
> run so it is
> >     better to check for this. However ...
> >
> > I'm not able to get it with macros.find(). What's the right way to find
> it?
>
> Find should work and `get` should also work and may be simpler.
>
> > Also, there's a 'cov_format' in testing.mc <http://testing.mc> that is
> hardcoded
> > to 'QEMU'. Can this value be updated from the cfg files ?
>
> I do not mind but maybe this logic is not needed if you can create the
> command
> line in a .cfg file. This means you can bring the needed options together
> from
> the BSP file which could hold the `-f TSIM` option you need and the code
> here is
> common for all coverage.
>
> >     > +            command = exe + ' -S ' + symbol_file + \
> >     > +                      ' -O ' + covoar_result_dir + \
> >     > +                      ' -E ' + self.explanations_txt + \
> >     > +                      ' -p ' + self.project_name + ' ' +
> self.executables
> >     > +        else:
> >     > +            command = exe + ' -S ' + symbol_file + \
> >     > +                      ' -O ' + covoar_result_dir + \
> >     > +                      ' -E ' + self.explanations_txt + \
> >     > +                      ' -f TSIM' + \
> >     > +                      ' -p ' + self.project_name + ' ' +
> self.executables
> >
> >     ... I would prefer the command be managed in the config files and
> this code
> >     removed. Do you think this can be done?
> >
> > the exe and the symbol_files are generated by the script itself. I think
> we have
> > to call covoar from the script only.
>
> That is fine, it is just the command line that I am asking about.
>
> something like the attached patch?

> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190206/639b46fc/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-Coverage-Add-support-for-TSIM-format.patch
Type: text/x-patch
Size: 4707 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190206/639b46fc/attachment-0002.bin>


More information about the devel mailing list