[PATCH] Coverage: Add support for TSIM format

Vijay Kumar Banerjee vijaykumar9597 at gmail.com
Fri Feb 1 11:47:26 UTC 2019


---
 tester/rt/coverage.py                       | 28 ++++++++++++++++-----
 tester/rtems/testing/bsps/leon3-sis-cov.ini |  3 ++-
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py
index 9fc9b64..859001a 100644
--- a/tester/rt/coverage.py
+++ b/tester/rt/coverage.py
@@ -288,7 +288,13 @@ class covoar(object):
     '''
     Covoar runner
     '''
-    def __init__(self, base_result_dir, config_dir, executables, explanations_txt, trace, prefix):
+    def __init__( self,
+                  base_result_dir,
+                  config_dir, executables,
+                  explanations_txt,
+                  trace,
+                  prefix,
+                  bsp ):
         self.base_result_dir = base_result_dir
         self.config_dir = config_dir
         self.executables = ' '.join(executables)
@@ -296,6 +302,7 @@ class covoar(object):
         self.project_name = 'RTEMS-5'
         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('-'):
+            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
+
         log.notice()
         log.notice('Running coverage analysis: %s (%s)' % (set_name, covoar_result_dir))
         start_time = datetime.datetime.now()
@@ -382,7 +397,8 @@ class coverage_run(object):
                 covoar_runner = covoar(self.test_dir, self.symbol_select_path,
                                        self.executables, self.explanations_txt,
                                        self.trace,
-                                       self.prefix)
+                                       self.prefix,
+                                       self.macros['bsp'])
                 covoar_runner.run(sset, self.symbol_select_path)
             self._generate_reports(symbol_sets);
             self._summarize();
diff --git a/tester/rtems/testing/bsps/leon3-sis-cov.ini b/tester/rtems/testing/bsps/leon3-sis-cov.ini
index f0a2ab9..39fc159 100644
--- a/tester/rtems/testing/bsps/leon3-sis-cov.ini
+++ b/tester/rtems/testing/bsps/leon3-sis-cov.ini
@@ -32,8 +32,9 @@
 # The leon3 BSP on sis with coverage
 #
 [leon3-sis-cov]
-bsp          = leon3
+bsp          = leon3-sis
 arch         = sparc
 tester       = %{_rtscripts}/run.cfg
+target       = sparc-rtems5
 bsp_run_cmd  = %{rtems_tools}/%{bsp_arch}-rtems%{rtems_version}-sis
 bsp_run_opts = -leon3 -nouartrx -r -tlim 200 s -cov
-- 
2.17.2



More information about the devel mailing list