[PATCH] Coverage: Add support for TSIM format
Chris Johns
chrisj at rtems.org
Wed Feb 6 21:26:16 UTC 2019
On 6/2/19 9:33 pm, Vijay Kumar Banerjee wrote:
>
>
>
> On Wed, 6 Feb 2019 at 14:04, Chris Johns <chrisj at rtems.org
> <mailto:chrisj at rtems.org>> wrote:
>
> On 6/2/19 7:24 pm, Vijay Kumar Banerjee wrote:
> > @@ -317,9 +324,11 @@ class covoar(object):
> > 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
> > + ' -O ' + covoar_result_dir + \
> > + ' -p ' + self.project_name + \
> > + ' ' + self.executables + ' '
>
> Can all these be placed in a macro variable and then accessed here?
>
> Maybe in defaults.mc <http://defaults.mc>?
>
> I tried this but it seems like all these need bsp name or version. So we can't
> add them in default.mc <http://default.mc>
> or testing.mc <http://testing.mc>. If we want to move it to the configuration
> files then we'll have to add it in the bsp ini file (like the explanations file
> has been added ). Do we want to have it in bsp file? It might make the ini file
> complicated.
You can add references to the BSP's macro entry "%{bsp}" in defaults.mc. All
then need to do is expand the macro when you need it. For example:
https://git.rtems.org/rtems-tools/tree/tester/rt/config.py#n146
If you print the macros instance in the config class you will see what it
contains. For example this command:
$ /opt/work/chris/rtems/tools/rtems-tools.git/tester/rtems-run \
--rtems-tools=/opt/work/rtems/5 --rtems-bsp=psim-run \
`find . -name hello.exe`
[ Added `print(self.macros)` as the first line of `def _dir_execute()` ]
The macro values of interest are:
[psim-run] w,r[0000]
_target: 'none' 'none' '%{%{bsp_arch}-rtems%{version}'
arch: 'none' 'none' 'powerpc'
bsp: 'none' 'none' 'psim'
bsp_arch: 'none' 'none' '%{arch}'
bsp_run_cmd: 'none' 'none'
'%{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-run'
bsp_run_opts: 'none' 'none' '-f
%{_rtscripts}/bsps/psim-device-tree'
console_stdio: 'none' 'none' '1'
exe_trace: 'none' 'none' 'output'
rtems_tools: 'none' 'none' '/opt/work/rtems/5/bin'
rtems_version: 'none' 'none' '5'
run_cmd: 'none' 'none'
'/opt/work/rtems/5/bin/powerpc-rtems5-run'
run_opts: 'none' 'none' '-f
/opt/work/chris/rtems/tools/rtems-tools.git/tester/rtems/testing/bsps/psim-de \
vice-tree'
test_disable_header: 'none' 'none' '1'
test_executable: 'none' 'none'
'./powerpc-rtems5/c/psim/testsuites/samples/hello.exe'
test_executable_opts: 'none' 'none' ''
test_index: 'none' 'none' '1'
test_total: 'none' 'none' '1'
tester: 'none' 'none' '%{_rtscripts}/run.cfg'
This means in `defaults.mc` you can use `%{arch}-%{bsp}` etc and if you expand
the macro the values will be recursively resolved.
Chris
More information about the devel
mailing list