<div dir="ltr">Hi Chris!<div><br></div><div>Do you find the patch alright? I was wondering if you were expecting some changes or modifications. I can do it and submit within this week. :)<br><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 16 Oct 2018 at 09:06, Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com">vijaykumar9597@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>mistakenly resent this. Sorry about it.</div><div dir="auto">I have made a separate patch for covoar,</div><div dir="auto">I intended to send that one. :) </div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Tue, Oct 16, 2018, 9:03 AM Vijay Kumar Banerjee <<a href="mailto:vijaykumar9597@gmail.com" target="_blank">vijaykumar9597@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Use the Object files in cpukit/ instead of the static library<br>
for Coverage analysis<br>
---<br>
tester/rt/coverage.py | 27 ++++--<br>
tester/rtems/testing/coverage/symbol-sets.ini | 90 +++++++++----------<br>
2 files changed, 66 insertions(+), 51 deletions(-)<br>
<br>
diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py<br>
index c979332..55cb59a 100644<br>
--- a/tester/rt/coverage.py<br>
+++ b/tester/rt/coverage.py<br>
@@ -244,13 +244,17 @@ class symbol_parser(object):<br>
symbol_config_path,<br>
symbol_select_path,<br>
symbol_set,<br>
- build_dir):<br>
+ build_dir,<br>
+ bsp_name,<br>
+ target):<br>
self.symbol_select_file = symbol_select_path<br>
self.symbol_file = symbol_config_path<br>
self.build_dir = build_dir<br>
self.symbol_sets = {}<br>
self.symbol_set = symbol_set<br>
self.ssets = []<br>
+ self.bsp_name = bsp_name<br>
+ self.target = target<br>
<br>
def parse(self):<br>
config = configparser.ConfigParser()<br>
@@ -264,9 +268,13 @@ class symbol_parser(object):<br>
for sset in self.ssets:<br>
lib = path.join(self.build_dir, config.get('libraries', sset))<br>
self.symbol_sets[sset] = lib.encode('utf-8')<br>
+ ss = self.symbol_sets[sset]<br>
+ ss = ss.replace('@BSP@', self.bsp_name)<br>
+ ss = ss.replace('@BUILD-TARGET@', self.target)<br>
+ self.symbol_sets[sset] = ss<br>
return self.ssets<br>
except:<br>
- raise error.general('Symbol set parsing failed')<br>
+ raise error.general('Symbol set parsing failed for %s' % sset)<br>
<br>
def write_ini(self, symbol_set):<br>
config = configparser.ConfigParser()<br>
@@ -275,11 +283,15 @@ class symbol_parser(object):<br>
config.add_section('symbol-sets')<br>
config.set('symbol-sets', 'sets', sset)<br>
config.add_section(sset)<br>
- config.set(sset, 'libraries', self.symbol_sets[sset])<br>
+ object_files = [o for o in os.listdir(self.symbol_sets[sset]) if o[-1] == 'o']<br>
+ object_paths = []<br>
+ for o in object_files:<br>
+ object_paths.append(path.join(self.symbol_sets[sset], o))<br>
+ config.set(sset, 'libraries', ','.join(object_paths))<br>
with open(self.symbol_select_file, 'w') as conf:<br>
- config.write(conf)<br>
+ config.write(conf)<br>
except:<br>
- raise error.general('symbol parser write failed')<br>
+ raise error.general('symbol parser write failed for %s' % sset)<br>
<br>
class covoar(object):<br>
'''<br>
@@ -357,6 +369,7 @@ class coverage_run(object):<br>
self.report_format = self.macros['cov_report_format']<br>
self.symbol_set = symbol_set<br>
self.target = self.macros['target']<br>
+ self.bsp_name = self.macros['bsp'].split('-')[0]<br>
<br>
def run(self):<br>
try:<br>
@@ -366,7 +379,9 @@ class coverage_run(object):<br>
parser = symbol_parser(self.symbol_config_path,<br>
self.symbol_select_path,<br>
self.symbol_set,<br>
- build_dir)<br>
+ build_dir,<br>
+ self.bsp_name,<br>
+ self.target)<br>
symbol_sets = parser.parse()<br>
for sset in symbol_sets:<br>
parser.write_ini(sset)<br>
diff --git a/tester/rtems/testing/coverage/symbol-sets.ini b/tester/rtems/testing/coverage/symbol-sets.ini<br>
index 2685ef4..8f85533 100644<br>
--- a/tester/rtems/testing/coverage/symbol-sets.ini<br>
+++ b/tester/rtems/testing/coverage/symbol-sets.ini<br>
@@ -29,50 +29,50 @@<br>
#<br>
<br>
[symbol-sets]<br>
-sets = score,rtems,sapi,libdl,posix,libirfs,libdosfs,libdevfs,libimfs,libcsupport,libbspcmdline,libcpuuse,libstackchk,libfsmount,libstringto,libdevnull,libdumpbuf,libblock<br>
+sets = score,rtems,sapi,libdl,posix,librfs,libdosfs,libdevfs,libimfs,libbspcmdline,libcpuuse,libstackchk,libfsmount,libstringto,libdevnull,libdumpbuf,libblock<br>
<br>
[libraries]<br>
-score = @BUILD-TARGET@/c/@BSP@/cpukit/score/libscore.a<br>
-rtems = @BUILD-TARGET@/c/@BSP@/cpukit/rtems/librtems.a<br>
-sapi = @BUILD-TARGET@/c/@BSP@/cpukit/sapi/libsapi.a<br>
-libdl = @BUILD-TARGET@/c/@BSP@/cpukit/libdl/libdl.a<br>
-posix = @BUILD-TARGET@/c/@BSP@/cpukit/posix/libposix.a<br>
-libirfs = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/librfs.a<br>
-libdosfs = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/libdosfs.a<br>
-libdevfs = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/libdevfs.a<br>
-libimfs = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/libimfs.a<br>
-#libdefaultsfs = @BUiLD-TARGET@/c/@BSP@/cpukit/libfs/libdefaultfs.a<br>
-#libjffs2 = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/libjffs2.a<br>
-#dtc = @BUILD-TARGET@/c/@BSP@/cpukit/libfdt/libfdt.a<br>
-#libdrvmgr = @BUILD-TARGET@/c/@BSP@/cpukit/libdrvmgr/libdrvmgr.a<br>
-#libi2c = @BUILD-TARGET@/c/@BSP@/cpukit/libi2c/libi2c.a<br>
-libcsupport = @BUILD-TARGET@/c/@BSP@/cpukit/libcsupport/libcsupport.a<br>
-libbspcmdline = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libbspcmdline.a<br>
-libcpuuse = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libcpuuse.a<br>
-libstackchk = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libstackchk.a<br>
-libfsmount = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libfsmount.a<br>
-libstringto = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libstringto.a<br>
-libdevnull = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libdevnull.a<br>
-libdumpbuf = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libdumpbuf.a<br>
-#libcapture = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libcapture.a<br>
-#libdummy = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libdummy.a<br>
-#libmonitor = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libmonitor.a<br>
-#libmouse = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libmouse.a<br>
-#libmw-fb = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libmw-fb.a<br>
-#libredirector = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libredirector.a<br>
-#librtemsfdt = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/librtemsfdt.a<br>
-#libserdbg = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libserdbg.a<br>
-#libshell = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libshell.a<br>
-#libtestsupport= @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libtestsupport.a<br>
-#libuntar = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libuntar.a<br>
-#libutf8proc = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libutf8proc.a<br>
-#libuuid = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libuuid.a<br>
-#libxz = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/libxz.a<br>
-libblock = @BUILD-TARGET@/c/@BSP@/cpukit/libblock/libblock.a<br>
-#libpci = @BUILD-TARGET@/c/@BSP@/cpukit/libpci/libpci.a<br>
-#librpc = @BUILD-TARGET@/c/@BSP@/cpukit/librpc/librpc.a<br>
-#libxdr = @BUILD-TARGET@/c/@BSP@/cpukit/librpc/libxdr.a<br>
-#libcrypt = @BUILD-TARGET@/c/@BSP@/cpukit/libcrypt/libcrypt.a<br>
-#libmd = @BUILD-TARGET@/c/@BSP@/cpukit/libmd/libmd.a<br>
-#libstdthreads = @BUILD-TARGET@/c/@BSP@/cpukit/libstdthreads/libstdthreads.a<br>
-#zlib = @BUILD-TARGET@/c/@BSP@/cpukit/zlib/libz.a<br>
+score = @BUILD-TARGET@/c/@BSP@/cpukit/score/src<br>
+rtems = @BUILD-TARGET@/c/@BSP@/cpukit/rtems/src<br>
+sapi = @BUILD-TARGET@/c/@BSP@/cpukit/sapi/src<br>
+libdl = @BUILD-TARGET@/c/@BSP@/cpukit/libdl<br>
+posix = @BUILD-TARGET@/c/@BSP@/cpukit/posix/src<br>
+librfs = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/src/rfs<br>
+libdosfs = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/src/dosfs<br>
+libdevfs = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/src/devfs<br>
+libimfs = @BUILD-TARGET@/c/@BSP@/cpukit/libfs/src/imfs<br>
+#libdefaultsfs = @BUiLD-TARGET@/c/@BSP@/cpukit/libfs<br>
+#libjffs2 = @BUILD-TARGET@/c/@BSP@/cpukit/libfs<br>
+#dtc = @BUILD-TARGET@/c/@BSP@/cpukit/libfdt<br>
+#libdrvmgr = @BUILD-TARGET@/c/@BSP@/cpukit/libdrvmgr<br>
+#libi2c = @BUILD-TARGET@/c/@BSP@/cpukit/libi2c<br>
+#libcsupport = @BUILD-TARGET@/c/@BSP@/cpukit/libcsupport/src<br>
+libbspcmdline = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/bspcmdline<br>
+libcpuuse = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/cpuuse<br>
+libstackchk = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/stackchk<br>
+libfsmount = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/fsmount<br>
+libstringto = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/stringto<br>
+libdevnull = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/devnull<br>
+libdumpbuf = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc/dumpbuf<br>
+#libcapture = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libdummy = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libmonitor = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libmouse = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libmw-fb = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libredirector = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#librtemsfdt = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libserdbg = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libshell = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libtestsupport= @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libuntar = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libutf8proc = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libuuid = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+#libxz = @BUILD-TARGET@/c/@BSP@/cpukit/libmisc<br>
+libblock = @BUILD-TARGET@/c/@BSP@/cpukit/libblock/src<br>
+#libpci = @BUILD-TARGET@/c/@BSP@/cpukit/libpci<br>
+#librpc = @BUILD-TARGET@/c/@BSP@/cpukit/librpc<br>
+#libxdr = @BUILD-TARGET@/c/@BSP@/cpukit/librpc<br>
+#libcrypt = @BUILD-TARGET@/c/@BSP@/cpukit/libcrypt<br>
+#libmd = @BUILD-TARGET@/c/@BSP@/cpukit/libmd<br>
+#libstdthreads = @BUILD-TARGET@/c/@BSP@/cpukit/libstdthreads<br>
+#zlib = @BUILD-TARGET@/c/@BSP@/cpukit/zlib<br>
-- <br>
2.17.0<br>
<br>
</blockquote></div></div></div>
</blockquote></div>