<div dir="ltr"><div class="gmail_extra">ping. :) </div><div class="gmail_extra"><br><div class="gmail_quote">On 25 July 2018 at 21:10, Vijay Kumar Banerjee <span dir="ltr"><<a href="mailto:vijaykumar9597@gmail.com" target="_blank">vijaykumar9597@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Invoke covoar multiple times from the script to generate separate<br>
reports for each symbol-set.<br>
---<br>
</span> tester/rt/coverage.py | 42 ++++++++++++++++++++----------<wbr>------------<br>
 1 file changed, 20 insertions(+), 22 deletions(-)<br>
<br>
diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py<br>
index 7dd5002..fe92d0a 100644<br>
<span class="">--- a/tester/rt/coverage.py<br>
+++ b/tester/rt/coverage.py<br>
@@ -100,7 +100,7 @@ class summary:<br>
<br>
 class report_gen_html:<br>
     def __init__(self, p_symbol_sets_list, build_dir, rtdir, bsp):<br>
-        self.symbol_sets_list = ['score']<br>
+        self.symbol_sets_list = p_symbol_sets_list<br>
         self.build_dir = build_dir<br>
         self.partial_reports_files = list(['index.html', 'summary.txt'])<br>
         self.number_of_columns = 1<br>
</span>@@ -250,41 +250,37 @@ class symbol_parser(object):<br>
         self.build_dir = build_dir<br>
         self.symbol_sets = {}<br>
         self.symbol_set = symbol_set<br>
-        self.ssets = []<br>
+        self.symbol_set_list = []<br>
<br>
     def parse(self):<br>
         config = configparser.ConfigParser()<br>
         try:<br>
             config.read(self.symbol_file)<br>
             if self.symbol_set is not None:<br>
-                self.ssets = self.symbol_set.split(',')<br>
+                self.symbol_set_list = self.symbol_set.split(',')<br>
             else:<br>
-                self.ssets = config.get('symbol-sets', 'sets').split(',')<br>
-                self.ssets = [sset.encode('utf-8') for sset in self.ssets]<br>
-            for sset in self.ssets:<br>
+                self.symbol_set_list = config.get('symbol-sets', 'sets').split(',')<br>
+                self.symbol_set_list = [sset.encode('utf-8') for sset in self.symbol_set_list]<br>
+            for sset in self.symbol_set_list:<br>
                 lib = path.join(self.build_dir, config.get('libraries', sset))<br>
                 self.symbol_sets[sset] = lib.encode('utf-8')<br>
+            return self.symbol_set_list <br>
<div><div class="h5">         except:<br>
             raise error.general('Symbol set parsing failed')<br>
<br>
-    def _write_ini(self):<br>
+    def write_ini(self, symbol_set):<br>
         config = configparser.ConfigParser()<br>
         try:<br>
-            sets = ', '.join(self.symbol_sets.keys()<wbr>)<br>
+            sset = symbol_set<br>
             config.add_section('symbol-<wbr>sets')<br>
-            config.set('symbol-sets', 'sets', sets)<br>
-            for key in self.symbol_sets.keys():<br>
-                config.add_section(key)<br>
-                config.set(key, 'libraries', self.symbol_sets[key])<br>
+            config.set('symbol-sets', 'sets', sset)<br>
+            config.add_section(sset)<br>
+            config.set(sset, 'libraries', self.symbol_sets[sset])<br>
             with open(self.symbol_select_file, 'w') as conf:<br>
                 config.write(conf)<br>
         except:<br>
             raise error.general('symbol parser write failed')<br>
<br>
-    def run(self):<br>
-        self.parse()<br>
-        self._write_ini()<br>
-<br>
 class covoar(object):<br>
     '''<br>
     Covoar runner<br>
</div></div>@@ -371,20 +367,22 @@ class coverage_run(object):<br>
<span class="">                                    self.symbol_select_path,<br>
                                    self.symbol_set,<br>
                                    build_dir)<br>
-            parser.run()<br>
-            covoar_runner = covoar(self.test_dir, self.symbol_select_path,<br>
</span>+            symbol_set_list = parser.parse()<br>
+            for sset in symbol_set_list:<br>
<span class="">+                parser.write_ini(sset)<br>
+                covoar_runner = covoar(self.test_dir, self.symbol_select_path,<br>
                                    self.executables, self.explanations_txt,<br>
                                    self.trace)<br>
-            covoar_runner.run('score', self.symbol_select_path)<br>
-            self._generate_reports();<br>
+                covoar_runner.run(sset, self.symbol_select_path)<br>
</span>+            self._generate_reports(symbol_<wbr>set_list);<br>
<div class="HOEnZb"><div class="h5">             self._summarize();<br>
         finally:<br>
             self._cleanup();<br>
<br>
-    def _generate_reports(self):<br>
+    def _generate_reports(self, symbol_sets):<br>
         log.notice('Coverage generating reports')<br>
         if self.report_format == 'html':<br>
-            report = report_gen_html(self.symbol_<wbr>sets,<br>
+            report = report_gen_html(symbol_sets,<br>
                                      self.build_dir,<br>
                                      self.rtdir,<br>
                                      self.macros['bsp'])<br>
</div></div><span class="HOEnZb"><font color="#888888">-- <br>
2.14.4<br>
<br>
</font></span></blockquote></div><br></div></div>