<div dir="ltr"><div dir="ltr"><br><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 5 Feb 2019 at 03:37, Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 1/2/19 10:47 pm, Vijay Kumar Banerjee wrote:<br>> ---<br>> tester/rt/coverage.py | 28 ++++++++++++++++-----<br>> tester/rtems/testing/bsps/leon3-sis-cov.ini | 3 ++-<br>> 2 files changed, 24 insertions(+), 7 deletions(-)<br>> <br>> diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py<br>> index 9fc9b64..859001a 100644<br>> --- a/tester/rt/coverage.py<br>> +++ b/tester/rt/coverage.py<br>> @@ -288,7 +288,13 @@ class covoar(object):<br>> '''<br>> Covoar runner<br>> '''<br>> - def __init__(self, base_result_dir, config_dir, executables, explanations_txt, trace, prefix):<br>> + def __init__( self,<br>
<br>Extra space?<br>
<br></blockquote><div>Will fix this in v2. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> + base_result_dir,<br>> + config_dir, executables,<br>> + explanations_txt,<br>> + trace,<br>> + prefix,<br>> + bsp ):<br>> self.base_result_dir = base_result_dir<br>> self.config_dir = config_dir<br>> self.executables = ' '.join(executables)<br>> @@ -296,6 +302,7 @@ class covoar(object):<br>> self.project_name = 'RTEMS-5'<br>
<br>I had not noticed this before. We should not be hard coding version numbers into<br>this part of the code. It requires updating after each release and all in likely<br>hood this one would be missed. The tool kit has support for versions.<br>
<br></blockquote><div>Understood. Will fix. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> self.trace = trace<br>> self.prefix = prefix<br>> + self.bsp = bsp<br>> <br>> def _find_covoar(self):<br>> covoar_exe = 'covoar'<br>> @@ -316,10 +323,18 @@ class covoar(object):<br>> if not path.exists(symbol_file):<br>> raise error.general('coverage: no symbol set file: %s'% (symbol_file))<br>> exe = self._find_covoar()<br>> - command = exe + ' -S ' + symbol_file + \<br>> - ' -O ' + covoar_result_dir + \<br>> - ' -E ' + self.explanations_txt + \<br>> - ' -p ' + self.project_name + ' ' + self.executables<br>> + if 'qemu' in self.bsp.split('-'):<br>
<br>Are you checking for 'qemu' in the BSP name? The naming used here is a<br>convention and making the code depend on a naming convention is fragile. Lets<br>not do this.<br>
<br>There is a `%{qemu-cmd}` macro defined which must exist for a qemu run so it is<br>better to check for this. However ...<br>
<br></blockquote><div>I'm not able to get it with macros.find(). What's the right way to find it?</div><div>Also, there's a 'cov_format' in <a href="http://testing.mc">testing.mc</a> that is hardcoded to 'QEMU'. Can this value be updated from the cfg files ?</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> + command = exe + ' -S ' + symbol_file + \<br>> + ' -O ' + covoar_result_dir + \<br>> + ' -E ' + self.explanations_txt + \<br>> + ' -p ' + self.project_name + ' ' + self.executables<br>> + else:<br>> + command = exe + ' -S ' + symbol_file + \<br>> + ' -O ' + covoar_result_dir + \<br>> + ' -E ' + self.explanations_txt + \<br>> + ' -f TSIM' + \<br>> + ' -p ' + self.project_name + ' ' + self.executables<br>
<br>... I would prefer the command be managed in the config files and this code<br>removed. Do you think this can be done?<br>
<br></blockquote><div>the exe and the symbol_files are generated by the script itself. I think we have to call</div><div>covoar from the script only. </div><div><br></div><div>Thanks for the review. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks<br>Chris<br>
</blockquote></div></div>