<div dir="ltr">This patch adapts the coverage report generator patch from ticket <a href="https://devel.rtems.org/ticket/2261">https://devel.rtems.org/ticket/2261</a> by capabilities to create coverage reports for pc386 and leon2.<div><br></div><div>---</div><div><div>From 2fb861b68652e98e9257ff81b6bb953ad3235552 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Tue, 9 Jun 2015 19:24:08 +0200</div><div>Subject: [PATCH 01/18] initial commit</div><div><br></div><div>---</div><div> rtemstoolkit/wscript                            |  2 +-</div><div> tester/rtems/testing/coverage/symbolSets.config | 80 ++++++++++++-------------</div><div> 2 files changed, 41 insertions(+), 41 deletions(-)</div><div><br></div><div>diff --git a/rtemstoolkit/wscript b/rtemstoolkit/wscript</div><div>index 229deeb..955d491 100644</div><div>--- a/rtemstoolkit/wscript</div><div>+++ b/rtemstoolkit/wscript</div><div>@@ -93,7 +93,7 @@ def build(bld):</div><div>               install_path = None,</div><div>               source = rld_source + rtems_utils + compression,</div><div>               defines = ['HAVE_CONFIG_H=1',</div><div>-                         'RTEMS_VERSION=' + bld.env.RTEMS_VERSION,</div><div>+                         'RTEMS_VERSION=' + str(bld.env.RTEMS_VERSION),</div><div>                          'FASTLZ_LEVEL=1'],</div><div>               includes = ['.'] + conf['includes'],</div><div>               cflags = conf['cflags'] + conf['warningflags'],</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index 6390dcf..99246c4 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -1,60 +1,60 @@</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">      </span>name=core</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">   </span>name=developmental</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">        </span>name=score</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">   </span>name=sapi</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">     </span>name=rtems</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">   </span>name=filesystems</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libjffs2.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdefaultfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libjffs2.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdefaultfs.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">       </span>name=libmisc</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">       </span>name=libcsupport</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">  </span>name=libblock</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">        </span>name=posix</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/cpukit/posix/libposix.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/posix/libposix.a</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 2cbe541900b04b1ff9d3e8240639106b0f0724b7 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Wed, 10 Jun 2015 21:02:52 +0200</div><div>Subject: [PATCH 02/18] since coverage.run() (coverage.py) is called in test.py</div><div> the hardcoded paths in the coverage are commented out</div><div><br></div><div>---</div><div> tester/rt/coverage.py | 8 ++++----</div><div> 1 file changed, 4 insertions(+), 4 deletions(-)</div><div><br></div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index e458241..4601e27 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -363,7 +363,7 @@ def output_handler(text):</div><div>     log.notice(text, stdout_only = False)</div><div> </div><div> if __name__ == "__main__":</div><div>-    c = coverage_run("/home/krzysztof/coverage/kmtest","/home/krzysztof/development/rtems/src/rtems-tools/tester")</div><div>-    c.prepareEnvironment()</div><div>-    c.executables = ["/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/testsuites/samples/hello/hello.exe"]</div><div>-    c.run()</div><div>+#    c = coverage_run("/home/krzysztof/coverage/kmtest","/home/krzysztof/development/rtems/src/rtems-tools/tester")</div><div>+#    c.prepareEnvironment()</div><div>+#    c.executables = ["/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/testsuites/samples/hello/hello.exe"]</div><div>+#    c.run()</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 4c82203c9310ee5bb0a05ec6a9b991b2581621ce Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Wed, 10 Jun 2015 23:18:19 +0200</div><div>Subject: [PATCH 03/18] created macro file to create coverage report by running</div><div> leon2 on qemu</div><div><br></div><div>---</div><div> tester/rt/coverage.py                       |  1 +</div><div> tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a> | 64 +++++++++++++++++++++++++++++</div><div> tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a>          | 22 +++++-----</div><div> 3 files changed, 76 insertions(+), 11 deletions(-)</div><div> create mode 100644 tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div><br></div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index 4601e27..4745a16 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -363,6 +363,7 @@ def output_handler(text):</div><div>     log.notice(text, stdout_only = False)</div><div> </div><div> if __name__ == "__main__":</div><div>+    print "coverage main"</div><div> #    c = coverage_run("/home/krzysztof/coverage/kmtest","/home/krzysztof/development/rtems/src/rtems-tools/tester")</div><div> #    c.prepareEnvironment()</div><div> #    c.executables = ["/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/testsuites/samples/hello/hello.exe"]</div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a> b/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>new file mode 100644</div><div>index 0000000..1c7453c</div><div>--- /dev/null</div><div>+++ b/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>@@ -0,0 +1,64 @@</div><div>+#</div><div>+# RTEMS Tools Project (<a href="http://www.rtems.org/">http://www.rtems.org/</a>)</div><div>+# Copyright 2010-2014 Chris Johns (<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>)</div><div>+# All rights reserved.</div><div>+#</div><div>+# This file is part of the RTEMS Tools package in 'rtems-tools'.</div><div>+#</div><div>+# Redistribution and use in source and binary forms, with or without</div><div>+# modification, are permitted provided that the following conditions are met:</div><div>+#</div><div>+# 1. Redistributions of source code must retain the above copyright notice,</div><div>+# this list of conditions and the following disclaimer.</div><div>+#</div><div>+# 2. Redistributions in binary form must reproduce the above copyright notice,</div><div>+# this list of conditions and the following disclaimer in the documentation</div><div>+# and/or other materials provided with the distribution.</div><div>+#</div><div>+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</div><div>+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</div><div>+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div>+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</div><div>+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</div><div>+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</div><div>+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div>+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</div><div>+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</div><div>+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</div><div>+# POSSIBILITY OF SUCH DAMAGE.</div><div>+#</div><div>+</div><div>+#</div><div>+# All paths in defaults must be Unix format. Do not store any Windows format</div><div>+# paths in the defaults.</div><div>+#</div><div>+# Every entry must describe the type of checking a host must pass.</div><div>+#</div><div>+# Records:</div><div>+#  key: type, attribute, value</div><div>+#   type     : none, dir, exe, triplet</div><div>+#   attribute: none, required, optional</div><div>+#   value    : 'single line', '''multi line'''</div><div>+#</div><div>+</div><div>+#</div><div>+# The sparc/leon2 QEMU BSP</div><div>+#</div><div>+</div><div>+[global]</div><div>+bsp:                      none,    none,     'leon2'</div><div>+coverage_supported:<span class="Apple-tab-span" style="white-space:pre">      </span>      none,<span class="Apple-tab-span" style="white-space:pre">      </span>   none,<span class="Apple-tab-span" style="white-space:pre">   </span>   '1'</div><div>+</div><div>+[leon2]</div><div>+leon2:                    none,    none,     '%{_rtscripts}/qemu.cfg'</div><div>+leon2_arch:               none,    none,     'sparc'</div><div>+leon2_opts:               none,    none,     '-nographic -M at697 -append "--console=com1;boot;"'</div><div>+</div><div>+[coverage]</div><div>+format:<span class="Apple-tab-span" style="white-space:pre">             </span>                none,    none,     'QEMU'</div><div>+target:<span class="Apple-tab-span" style="white-space:pre">                </span>                none,    none,     'sparc-rtems4.11'</div><div>+explanations:<span class="Apple-tab-span" style="white-space:pre">       </span>            none,    none,     '%{_rtscripts}/coverage/Explanations.txt'</div><div>+coverageExtension:<span class="Apple-tab-span" style="white-space:pre">        </span>      none,    none,     'exe.cov'</div><div>+gcnosFile:<span class="Apple-tab-span" style="white-space:pre"> </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div>+executableExtension:<span class="Apple-tab-span" style="white-space:pre">        </span>    none,    none,     'exe'</div><div>+projectName:<span class="Apple-tab-span" style="white-space:pre">      </span>            none,    none,     'RTEMS 4.11'</div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a> b/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>index 9418c00..52ed275 100644</div><div>--- a/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>+++ b/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>@@ -49,18 +49,18 @@ hda:<span class="Apple-tab-span" style="white-space:pre">   </span>none,<span class="Apple-tab-span" style="white-space:pre">       </span>dir,<span class="Apple-tab-span" style="white-space:pre">        </span>'%{_rtscripts}/coverage/rtems-boot.img'</div><div> </div><div> [global]</div><div> bsp:                      none,    none,     'pc386'</div><div>-coverage_supported:<span class="Apple-tab-span" style="white-space:pre">    </span>  none,<span class="Apple-tab-span" style="white-space:pre">    </span>   none,<span class="Apple-tab-span" style="white-space:pre">   </span>'1'</div><div>+coverage_supported:<span class="Apple-tab-span" style="white-space:pre">      </span>      none,<span class="Apple-tab-span" style="white-space:pre">      </span>   none,<span class="Apple-tab-span" style="white-space:pre">   </span>   '1'</div><div> </div><div> [pc386]</div><div>-pc386:      none,    none,  '%{_rtscripts}/qemu.cfg'</div><div>-pc386_arch: none,    none,  'i386'</div><div>-pc386_opts: none,    none,  '-m 128 -boot b -hda %{hda} %{qemu_opts_base} -append "--console=com1;boot;"'</div><div>+pc386:                    none,    none,     '%{_rtscripts}/qemu.cfg'</div><div>+pc386_arch:               none,    none,     'i386'</div><div>+pc386_opts:               none,    none,     '-m 128 -boot b -hda %{hda} %{qemu_opts_base} -append "--console=com1;boot;"'</div><div> </div><div> [coverage]</div><div>-format:<span class="Apple-tab-span" style="white-space:pre">            </span>none, none, 'QEMU'</div><div>-target:<span class="Apple-tab-span" style="white-space:pre">           </span>none, none, 'i386-rtems4.11'</div><div>-explanations:<span class="Apple-tab-span" style="white-space:pre">   </span>none, none, '%{_rtscripts}/coverage/Explanations.txt'</div><div>-coverageExtension:<span class="Apple-tab-span" style="white-space:pre">     </span>none, none, 'exe.cov'</div><div>-gcnosFile:<span class="Apple-tab-span" style="white-space:pre">     </span>none, none, '%{_rtscripts}/coverage/rtems.gcnos'</div><div>-executableExtension:<span class="Apple-tab-span" style="white-space:pre">        </span>none, none, 'exe'</div><div>-projectName:<span class="Apple-tab-span" style="white-space:pre">       </span>none, none, 'RTEMS 4.11'</div><div>+format:<span class="Apple-tab-span" style="white-space:pre">             </span>                none,    none,     'QEMU'</div><div>+target:<span class="Apple-tab-span" style="white-space:pre">                </span>                none,    none,     'i386-rtems4.11'</div><div>+explanations:<span class="Apple-tab-span" style="white-space:pre">        </span>            none,    none,     '%{_rtscripts}/coverage/Explanations.txt'</div><div>+coverageExtension:<span class="Apple-tab-span" style="white-space:pre">        </span>      none,    none,     'exe.cov'</div><div>+gcnosFile:<span class="Apple-tab-span" style="white-space:pre"> </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div>+executableExtension:<span class="Apple-tab-span" style="white-space:pre">        </span>    none,    none,     'exe'</div><div>+projectName:<span class="Apple-tab-span" style="white-space:pre">      </span>            none,    none,     'RTEMS 4.11'</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 2538a9072d622cf3837ce02a06ec52209add615c Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Thu, 11 Jun 2015 22:41:32 +0200</div><div>Subject: [PATCH 04/18] added some error handling if test execution does not</div><div> cover any branch</div><div><br></div><div>---</div><div> tester/rt/coverage.py | 11 ++++++++---</div><div> 1 file changed, 8 insertions(+), 3 deletions(-)</div><div><br></div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index 4745a16..0255dab 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -44,13 +44,18 @@ class summary:</div><div>         self.branches_alwaysTaken = self._getValueFromNextLineWithoutColon(summaryFile)</div><div>         self.branches_neverTaken = self._getValueFromNextLineWithoutColon(summaryFile)</div><div>         summaryFile.close()</div><div>-</div><div>-        self.percentage_branchesCovered = 1 - float(self.branches_uncovered) / float(self.branches_total)</div><div>+        if not self.branches_uncovered == '' and not self.branches_total == '':</div><div>+            self.percentage_branchesCovered = 1 - float(self.branches_uncovered) / float(self.branches_total)</div><div>+        else:</div><div>+            self.percentage_branchesCovered = 0.0</div><div>         return</div><div> </div><div>     def _getValueFromNextLineWithColon(self, summaryFile):</div><div>         line = summaryFile.readline()</div><div>-        return line.split(':')[1].strip()</div><div>+        if ':' in line:</div><div>+            return line.split(':')[1].strip()</div><div>+        else:</div><div>+            return ''</div><div> </div><div>     def _getValueFromNextLineWithoutColon(self, summaryFile):</div><div>         line = summaryFile.readline()</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 6788a341c0071865341c8bbc9fb053b3f9b33456 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Thu, 11 Jun 2015 22:57:56 +0200</div><div>Subject: [PATCH 05/18] added configuration macro file to use coverage</div><div> reporting for leon3</div><div><br></div><div>---</div><div> tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a> |  2 +-</div><div> tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a> | 64 +++++++++++++++++++++++++++++</div><div> 2 files changed, 65 insertions(+), 1 deletion(-)</div><div> create mode 100644 tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a></div><div><br></div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a> b/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>index 1c7453c..ae004e9 100644</div><div>--- a/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>+++ b/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>@@ -52,7 +52,7 @@ coverage_supported:<span class="Apple-tab-span" style="white-space:pre">  </span>      none,<span class="Apple-tab-span" style="white-space:pre">      </span>   none,<span class="Apple-tab-span" style="white-space:pre">   </span>   '1'</div><div> [leon2]</div><div> leon2:                    none,    none,     '%{_rtscripts}/qemu.cfg'</div><div> leon2_arch:               none,    none,     'sparc'</div><div>-leon2_opts:               none,    none,     '-nographic -M at697 -append "--console=com1;boot;"'</div><div>+leon2_opts:               none,    none,     '-M at697 -append "--console=com1;boot;"'</div><div> </div><div> [coverage]</div><div> format:<span class="Apple-tab-span" style="white-space:pre">            </span>                none,    none,     'QEMU'</div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a> b/tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a></div><div>new file mode 100644</div><div>index 0000000..ae25268</div><div>--- /dev/null</div><div>+++ b/tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a></div><div>@@ -0,0 +1,64 @@</div><div>+#</div><div>+# RTEMS Tools Project (<a href="http://www.rtems.org/">http://www.rtems.org/</a>)</div><div>+# Copyright 2010-2014 Chris Johns (<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>)</div><div>+# All rights reserved.</div><div>+#</div><div>+# This file is part of the RTEMS Tools package in 'rtems-tools'.</div><div>+#</div><div>+# Redistribution and use in source and binary forms, with or without</div><div>+# modification, are permitted provided that the following conditions are met:</div><div>+#</div><div>+# 1. Redistributions of source code must retain the above copyright notice,</div><div>+# this list of conditions and the following disclaimer.</div><div>+#</div><div>+# 2. Redistributions in binary form must reproduce the above copyright notice,</div><div>+# this list of conditions and the following disclaimer in the documentation</div><div>+# and/or other materials provided with the distribution.</div><div>+#</div><div>+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</div><div>+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</div><div>+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</div><div>+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</div><div>+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</div><div>+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</div><div>+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</div><div>+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</div><div>+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</div><div>+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</div><div>+# POSSIBILITY OF SUCH DAMAGE.</div><div>+#</div><div>+</div><div>+#</div><div>+# All paths in defaults must be Unix format. Do not store any Windows format</div><div>+# paths in the defaults.</div><div>+#</div><div>+# Every entry must describe the type of checking a host must pass.</div><div>+#</div><div>+# Records:</div><div>+#  key: type, attribute, value</div><div>+#   type     : none, dir, exe, triplet</div><div>+#   attribute: none, required, optional</div><div>+#   value    : 'single line', '''multi line'''</div><div>+#</div><div>+</div><div>+#</div><div>+# The sparc/leon3 QEMU BSP</div><div>+#</div><div>+</div><div>+[global]</div><div>+bsp:                      none,    none,     'leon3'</div><div>+coverage_supported:<span class="Apple-tab-span" style="white-space:pre">        </span>      none,<span class="Apple-tab-span" style="white-space:pre">      </span>   none,<span class="Apple-tab-span" style="white-space:pre">   </span>   '1'</div><div>+</div><div>+[leon3]</div><div>+leon3:                    none,    none,     '%{_rtscripts}/qemu.cfg'</div><div>+leon3_arch:               none,    none,     'sparc'</div><div>+leon3_opts:               none,    none,     '-M leon3_generic -m 64M "--console=com1;boot;"'</div><div>+</div><div>+[coverage]</div><div>+format:<span class="Apple-tab-span" style="white-space:pre">         </span>                none,    none,     'QEMU'</div><div>+target:<span class="Apple-tab-span" style="white-space:pre">                </span>                none,    none,     'sparc-rtems4.11'</div><div>+explanations:<span class="Apple-tab-span" style="white-space:pre">       </span>            none,    none,     '%{_rtscripts}/coverage/Explanations.txt'</div><div>+coverageExtension:<span class="Apple-tab-span" style="white-space:pre">        </span>      none,    none,     'exe.cov'</div><div>+gcnosFile:<span class="Apple-tab-span" style="white-space:pre"> </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div>+executableExtension:<span class="Apple-tab-span" style="white-space:pre">        </span>    none,    none,     'exe'</div><div>+projectName:<span class="Apple-tab-span" style="white-space:pre">      </span>            none,    none,     'RTEMS 4.11'</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 2e9dc54506e68abb57ee8a17f407b565f4541b9d Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Fri, 12 Jun 2015 22:53:28 +0200</div><div>Subject: [PATCH 06/18] added dump of executableInfo when creating coverage map</div><div> in DesiredSymbols</div><div><br></div><div>---</div><div> tester/covoar/DesiredSymbols.cc                    |  5 +-</div><div> tester/covoar/DesiredSymbols.h                     |  3 +-</div><div> tester/covoar/ObjdumpProcessor.cc                  |  2 +-</div><div> tester/rtems/testing/coverage/symbolSets.config    | 80 +++++++++++-----------</div><div> .../rtems/testing/coverage/symbolSets_pc386.config | 60 ++++++++++++++++</div><div> 5 files changed, 107 insertions(+), 43 deletions(-)</div><div> create mode 100644 tester/rtems/testing/coverage/symbolSets_pc386.config</div><div><br></div><div>diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc</div><div>index b5032b4..827a78c 100644</div><div>--- a/tester/covoar/DesiredSymbols.cc</div><div>+++ b/tester/covoar/DesiredSymbols.cc</div><div>@@ -336,13 +336,16 @@ namespace Coverage {</div><div> </div><div>   void DesiredSymbols::createCoverageMap(</div><div>     const std::string& symbolName,</div><div>-    uint32_t           size</div><div>+    uint32_t           size,</div><div>+    ExecutableInfo* const theExecutable</div><div>   )</div><div>   {</div><div>     CoverageMapBase*      aCoverageMap;</div><div>     uint32_t              highAddress;</div><div>     symbolSet_t::iterator itr;</div><div> </div><div>+    theExecutable->dumpExecutableInfo();</div><div>+</div><div>     // Ensure that the symbol is a desired symbol.</div><div>     itr = set.find( symbolName );</div><div> </div><div>diff --git a/tester/covoar/DesiredSymbols.h b/tester/covoar/DesiredSymbols.h</div><div>index 448f263..7c00e48 100644</div><div>--- a/tester/covoar/DesiredSymbols.h</div><div>+++ b/tester/covoar/DesiredSymbols.h</div><div>@@ -224,7 +224,8 @@ namespace Coverage {</div><div>      */</div><div>     void createCoverageMap(</div><div>       const std::string& symbolName,</div><div>-      uint32_t           size</div><div>+      uint32_t           size,</div><div>+      ExecutableInfo* const theExecutable</div><div>     );</div><div> </div><div>     /*!</div><div>diff --git a/tester/covoar/ObjdumpProcessor.cc b/tester/covoar/ObjdumpProcessor.cc</div><div>index 486c720..71c798d 100644</div><div>--- a/tester/covoar/ObjdumpProcessor.cc</div><div>+++ b/tester/covoar/ObjdumpProcessor.cc</div><div>@@ -112,7 +112,7 @@ namespace Coverage {</div><div> </div><div>       // Create a unified coverage map for the symbol.</div><div>       SymbolsToAnalyze->createCoverageMap(</div><div>-        symbolName, endAddress - lowAddress + 1</div><div>+        symbolName, endAddress - lowAddress + 1, executableInfo</div><div>       );</div><div>     }</div><div>   }</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index 99246c4..b87a3d4 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -1,60 +1,60 @@</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">     </span>name=core</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">  </span>name=developmental</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/librfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdosfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdevfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libimfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libcsupport/libcsupport.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">     </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstackchk.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libbspcmdline.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libcpuuse.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstringto.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdevnull.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdumpbuf.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libblock/libblock.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">       </span>name=score</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">  </span>name=sapi</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">    </span>name=rtems</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">  </span>name=filesystems</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libjffs2.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdefaultfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdevfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdosfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libimfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/librfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libjffs2.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdefaultfs.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">      </span>name=libmisc</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstackchk.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libbspcmdline.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libcpuuse.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstringto.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdevnull.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdumpbuf.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">      </span>name=libcsupport</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libcsupport/libcsupport.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>name=libblock</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libblock/libblock.a</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">       </span>name=posix</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/posix/libposix.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/posix/libposix.a</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets_pc386.config b/tester/rtems/testing/coverage/symbolSets_pc386.config</div><div>new file mode 100644</div><div>index 0000000..99246c4</div><div>--- /dev/null</div><div>+++ b/tester/rtems/testing/coverage/symbolSets_pc386.config</div><div>@@ -0,0 +1,60 @@</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>name=core</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">     </span>name=developmental</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>name=score</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">     </span>name=sapi</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/sapi/libsapi.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>name=rtems</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/librtems.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">     </span>name=filesystems</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdevfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdosfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libimfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/librfs.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libjffs2.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libfs/libdefaultfs.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>name=libmisc</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstackchk.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libbspcmdline.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libcpuuse.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libstringto.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdevnull.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libmisc/libdumpbuf.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>name=libcsupport</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libcsupport/libcsupport.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>name=libblock</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/libblock/libblock.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>name=posix</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/posix/libposix.a</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 652ab7bc3567479e1727d022cd4eaa087754bba6 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Wed, 24 Jun 2015 23:20:33 +0200</div><div>Subject: [PATCH 07/18] sample test cases pass when executing them on leon2</div><div> with qemu</div><div><br></div><div>---</div><div> tester/covoar/DesiredSymbols.cc                 |  2 +-</div><div> tester/covoar/covoar.cc                         |  4 ++--</div><div> tester/rt/coverage.py                           | 12 ++++++------</div><div> tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a>     |  2 +-</div><div> tester/rtems/testing/coverage/symbolSets.config |  1 -</div><div> 5 files changed, 10 insertions(+), 11 deletions(-)</div><div><br></div><div>diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc</div><div>index 827a78c..6b855f8 100644</div><div>--- a/tester/covoar/DesiredSymbols.cc</div><div>+++ b/tester/covoar/DesiredSymbols.cc</div><div>@@ -344,7 +344,7 @@ namespace Coverage {</div><div>     uint32_t              highAddress;</div><div>     symbolSet_t::iterator itr;</div><div> </div><div>-    theExecutable->dumpExecutableInfo();</div><div>+    //theExecutable->dumpExecutableInfo();</div><div> </div><div>     // Ensure that the symbol is a desired symbol.</div><div>     itr = set.find( symbolName );</div><div>diff --git a/tester/covoar/covoar.cc b/tester/covoar/covoar.cc</div><div>index f8681ec..fa58828 100644</div><div>--- a/tester/covoar/covoar.cc</div><div>+++ b/tester/covoar/covoar.cc</div><div>@@ -94,7 +94,7 @@ Configuration::Options_t Options[] = {</div><div>   { "explanations",         NULL },</div><div>   { "format",               NULL },</div><div>   { "symbolsFile",          NULL },</div><div>-  { "symbolSetFile",<span class="Apple-tab-span" style="white-space:pre">           </span>NULL },</div><div>+  { "symbolSetFile",<span class="Apple-tab-span" style="white-space:pre">              </span>    NULL },</div><div>   { "outputDirectory",      NULL },</div><div>   { "executableExtension",  NULL },</div><div>   { "coverageExtension",    NULL },</div><div>@@ -183,7 +183,7 @@ int main(</div><div>       case 'E': explanations          = optarg; break;</div><div>       case 'f': format                = optarg; break;</div><div>       case 's': symbolsFile           = optarg; break;</div><div>-      case 'S': symbolSetFile<span class="Apple-tab-span" style="white-space:pre">                </span>  = optarg; break;</div><div>+      case 'S': symbolSetFile<span class="Apple-tab-span" style="white-space:pre">         </span>      = optarg; break;</div><div>       case 'T': target                = optarg; break;</div><div>       case 'O': outputDirectory       = optarg; break;</div><div>       case 'v': Verbose               = true;   break;</div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index 0255dab..53abf43 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -256,7 +256,7 @@ class covoar(object):</div><div>             log.stderr("Skipping " + setName)</div><div>             return</div><div> </div><div>-        command = "covoar -C" + covoarConfigFile + " -S " + symbolFile + " -O " + covoarResultDir + " " + path.join(self.tracesDir, "*.exe")</div><div>+        command = "covoar -v -C" + covoarConfigFile + " -S " + symbolFile + " -O " + covoarResultDir + " " + path.join(self.tracesDir, "*.exe")</div><div>         log.notice("Running covoar for " + setName, stdout_only=True)</div><div>         log.notice(command, stdout_only=True)</div><div>         executor = execute.execute(verbose=True, output=output_handler)</div><div>@@ -359,7 +359,7 @@ class coverage_run(object):</div><div> </div><div>     def _cleanup(self):</div><div>         log.notice("Cleaning workspace up")</div><div>-        path.removeall(self.tracesDir)</div><div>+        #path.removeall(self.tracesDir)</div><div> </div><div>     def _summarize(self):</div><div>         log.notice("Coverage analysis finished. You can find results in " + self.targetDir)</div><div>@@ -369,7 +369,7 @@ def output_handler(text):</div><div> </div><div> if __name__ == "__main__":</div><div>     print "coverage main"</div><div>-#    c = coverage_run("/home/krzysztof/coverage/kmtest","/home/krzysztof/development/rtems/src/rtems-tools/tester")</div><div>-#    c.prepareEnvironment()</div><div>-#    c.executables = ["/home/krzysztof/development/rtems/src/b-pc386/i386-rtems4.11/c/pc386/testsuites/samples/hello/hello.exe"]</div><div>-#    c.run()</div><div>+    c = coverage_run("/home/hf/coverage_test_leon2","/home/hf/development/rtems/src/rtems-tools/tester")</div><div>+    c.prepareEnvironment()</div><div>+    c.executables = ["/home/hf/development/rtems/src/b-leon2/sparc-rtems4.11/c/leon2/testsuites/samples/hello/hello.exe"]</div><div>+    c.run()</div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a> b/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>index ae004e9..bd552bd 100644</div><div>--- a/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>+++ b/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>@@ -52,7 +52,7 @@ coverage_supported:<span class="Apple-tab-span" style="white-space:pre">    </span>      none,<span class="Apple-tab-span" style="white-space:pre">      </span>   none,<span class="Apple-tab-span" style="white-space:pre">   </span>   '1'</div><div> [leon2]</div><div> leon2:                    none,    none,     '%{_rtscripts}/qemu.cfg'</div><div> leon2_arch:               none,    none,     'sparc'</div><div>-leon2_opts:               none,    none,     '-M at697 -append "--console=com1;boot;"'</div><div>+leon2_opts:               none,    none,     '-nographic -machine at697'</div><div> </div><div> [coverage]</div><div> format:<span class="Apple-tab-span" style="white-space:pre">               </span>                none,    none,     'QEMU'</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index b87a3d4..fcad5a3 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -17,7 +17,6 @@ symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libbspcmdline.a</div><div> <span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libcpuuse.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstringto.a</div><div> <span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdevnull.a</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdumpbuf.a</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 0cd5366e7df3fd7e90405b325a29a5dcb4ad8b6d Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Thu, 25 Jun 2015 17:11:08 +0200</div><div>Subject: [PATCH 08/18] covoar improved diagnostics patch applied</div><div><br></div><div>---</div><div> tester/covoar/CoverageMap.cc        |  7 ++++---</div><div> tester/covoar/CoverageMap.h         |  5 +++--</div><div> tester/covoar/CoverageMapBase.cc    |  6 ++++--</div><div> tester/covoar/CoverageMapBase.h     | 11 +++++++++--</div><div> tester/covoar/CoverageReaderQEMU.cc |  5 +++--</div><div> tester/covoar/DesiredSymbols.cc     | 16 +++++++++-------</div><div> tester/covoar/DesiredSymbols.h      |  6 ++++--</div><div> tester/covoar/ExecutableInfo.cc     |  3 ++-</div><div> tester/covoar/ExecutableInfo.h      |  2 ++</div><div> tester/covoar/ObjdumpProcessor.cc   |  4 ++--</div><div> tester/rt/coverage.py               |  2 +-</div><div> 11 files changed, 43 insertions(+), 24 deletions(-)</div><div><br></div><div>diff --git a/tester/covoar/CoverageMap.cc b/tester/covoar/CoverageMap.cc</div><div>index 816be11..b470fea 100644</div><div>--- a/tester/covoar/CoverageMap.cc</div><div>+++ b/tester/covoar/CoverageMap.cc</div><div>@@ -10,9 +10,10 @@</div><div> namespace Coverage {</div><div> </div><div>   CoverageMap::CoverageMap(</div><div>-    uint32_t low,</div><div>-    uint32_t high</div><div>-  ) : CoverageMapBase(low, high)</div><div>+    const std::string& exefileName,</div><div>+    uint32_t           low,</div><div>+    uint32_t           high</div><div>+  ) : CoverageMapBase(exefileName, low, high)</div><div>   {</div><div>   }</div><div> </div><div>diff --git a/tester/covoar/CoverageMap.h b/tester/covoar/CoverageMap.h</div><div>index 0f2f6d4..c211949 100644</div><div>--- a/tester/covoar/CoverageMap.h</div><div>+++ b/tester/covoar/CoverageMap.h</div><div>@@ -27,8 +27,9 @@ namespace Coverage {</div><div>      *  @param[in] high specifies the highest address of the coverage map.</div><div>      */</div><div>     CoverageMap(</div><div>-      uint32_t low,</div><div>-      uint32_t high</div><div>+      const std::string& exefileName,</div><div>+      uint32_t           low,</div><div>+      uint32_t           high</div><div>     );</div><div> </div><div>     /* Inherit documentation from base class. */</div><div>diff --git a/tester/covoar/CoverageMapBase.cc b/tester/covoar/CoverageMapBase.cc</div><div>index 407ef5f..ed30603 100644</div><div>--- a/tester/covoar/CoverageMapBase.cc</div><div>+++ b/tester/covoar/CoverageMapBase.cc</div><div>@@ -16,13 +16,15 @@</div><div> namespace Coverage {</div><div> </div><div>   CoverageMapBase::CoverageMapBase(</div><div>-    uint32_t low,</div><div>-    uint32_t high</div><div>+    const std::string& exefileName,</div><div>+    uint32_t           low,</div><div>+    uint32_t           high</div><div>   )</div><div>   {</div><div>     uint32_t       a;</div><div>     AddressRange_t range;</div><div> </div><div>+    range.fileName    = exefileName;</div><div>     range.lowAddress  = low;</div><div>     range.highAddress = high;</div><div>     RangeList.push_back( range );</div><div>diff --git a/tester/covoar/CoverageMapBase.h b/tester/covoar/CoverageMapBase.h</div><div>index 70b2b30..e1310c9 100644</div><div>--- a/tester/covoar/CoverageMapBase.h</div><div>+++ b/tester/covoar/CoverageMapBase.h</div><div>@@ -28,6 +28,11 @@ namespace Coverage {</div><div>      */</div><div>     typedef struct {</div><div>       /*!</div><div>+       *  This is the file from which this originated.</div><div>+       */</div><div>+      std::string fileName;</div><div>+</div><div>+      /*!</div><div>        *  This is the low address of the address map range.</div><div>        */</div><div>       uint32_t lowAddress;</div><div>@@ -48,12 +53,14 @@ namespace Coverage {</div><div>     /*! </div><div>      *  This method constructs a CoverageMapBase instance.</div><div>      *</div><div>+     *  @param[in] exefileName specifies the executable this originated in</div><div>      *  @param[in] low specifies the lowest address of the coverage map</div><div>      *  @param[in] high specifies the highest address of the coverage map</div><div>      */</div><div>     CoverageMapBase(</div><div>-      uint32_t low,</div><div>-      uint32_t high</div><div>+      const std::string& exefileName,</div><div>+      uint32_t           low,</div><div>+      uint32_t           high</div><div>     );</div><div> </div><div>     /*! </div><div>diff --git a/tester/covoar/CoverageReaderQEMU.cc b/tester/covoar/CoverageReaderQEMU.cc</div><div>index 8e34f8f..8681afe 100644</div><div>--- a/tester/covoar/CoverageReaderQEMU.cc</div><div>+++ b/tester/covoar/CoverageReaderQEMU.cc</div><div>@@ -147,10 +147,11 @@ namespace Coverage {</div><div>               stderr,</div><div>               "*** Trace block is inconsistent with coverage map\n"</div><div>               "*** Trace block (0x%08x - 0x%08x) for %d bytes\n"</div><div>-              "*** Coverage map XXX \n",</div><div>+              "*** Coverage map %s\n",</div><div>               entry->pc,</div><div>               a,</div><div>-              entry->size</div><div>+              entry->size,</div><div>+              file</div><div>             );</div><div>           } else {</div><div>             while (!aCoverageMap->isStartOfInstruction(a))</div><div>diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc</div><div>index 6b855f8..f00c2c5 100644</div><div>--- a/tester/covoar/DesiredSymbols.cc</div><div>+++ b/tester/covoar/DesiredSymbols.cc</div><div>@@ -335,17 +335,15 @@ namespace Coverage {</div><div> </div><div> </div><div>   void DesiredSymbols::createCoverageMap(</div><div>+    const std::string& exefileName,</div><div>     const std::string& symbolName,</div><div>-    uint32_t           size,</div><div>-    ExecutableInfo* const theExecutable</div><div>+    uint32_t           size</div><div>   )</div><div>   {</div><div>     CoverageMapBase*      aCoverageMap;</div><div>     uint32_t              highAddress;</div><div>     symbolSet_t::iterator itr;</div><div> </div><div>-    //theExecutable->dumpExecutableInfo();</div><div>-</div><div>     // Ensure that the symbol is a desired symbol.</div><div>     itr = set.find( symbolName );</div><div> </div><div>@@ -369,9 +367,12 @@ namespace Coverage {</div><div>         fprintf(</div><div>           stderr,</div><div>           "ERROR: DesiredSymbols::createCoverageMap - Attempt to create "</div><div>-          "unified coverage maps for %s with different sizes (%d != %d)\n",</div><div>+          "unified coverage maps for %s with different sizes (%s/%d != %s/%d)\n",</div><div>+          exefileName.c_str(),</div><div>           symbolName.c_str(),</div><div>+          </div><div>           itr->second.stats.sizeInBytes,</div><div>+          itr->second.sourceFile->getFileName().c_str(),</div><div>           size</div><div>         );</div><div>         if ( itr->second.stats.sizeInBytes < size )</div><div>@@ -387,13 +388,14 @@ namespace Coverage {</div><div> </div><div>       highAddress = size - 1;</div><div> </div><div>-      aCoverageMap = new CoverageMap( 0, highAddress );</div><div>+      aCoverageMap = new CoverageMap( exefileName, 0, highAddress );</div><div>       if (!aCoverageMap) {</div><div> </div><div>         fprintf(</div><div>           stderr,</div><div>           "ERROR: DesiredSymbols::createCoverageMap - Unable to allocate "</div><div>-          "coverage map for %s\n",</div><div>+          "coverage map for %s:%s\n",</div><div>+          exefileName.c_str(),</div><div>           symbolName.c_str()</div><div>         );</div><div>         exit( -1 );</div><div>diff --git a/tester/covoar/DesiredSymbols.h b/tester/covoar/DesiredSymbols.h</div><div>index 7c00e48..aacc3ef 100644</div><div>--- a/tester/covoar/DesiredSymbols.h</div><div>+++ b/tester/covoar/DesiredSymbols.h</div><div>@@ -218,14 +218,16 @@ namespace Coverage {</div><div>      *  This method creates a coverage map for the specified symbol</div><div>      *  using the specified size.</div><div>      *</div><div>+     *  @param[in] exefileName specifies the executable from which the</div><div>+     *             coverage map is being created</div><div>      *  @param[in] symbolName specifies the symbol for which to create</div><div>      *             a coverage map</div><div>      *  @param[in] size specifies the size of the coverage map to create</div><div>      */</div><div>     void createCoverageMap(</div><div>+      const std::string& exefileName,</div><div>       const std::string& symbolName,</div><div>-      uint32_t           size,</div><div>-      ExecutableInfo* const theExecutable</div><div>+      uint32_t           size</div><div>     );</div><div> </div><div>     /*!</div><div>diff --git a/tester/covoar/ExecutableInfo.cc b/tester/covoar/ExecutableInfo.cc</div><div>index 0a7eac3..d71c435 100644</div><div>--- a/tester/covoar/ExecutableInfo.cc</div><div>+++ b/tester/covoar/ExecutableInfo.cc</div><div>@@ -89,6 +89,7 @@ namespace Coverage {</div><div>   }</div><div> </div><div>   CoverageMapBase* ExecutableInfo::createCoverageMap (</div><div>+    const std::string& fileName,</div><div>     const std::string& symbolName,</div><div>     uint32_t           lowAddress,</div><div>     uint32_t           highAddress</div><div>@@ -99,7 +100,7 @@ namespace Coverage {</div><div> </div><div>     itr = coverageMaps.find( symbolName );</div><div>     if ( itr == coverageMaps.end() ) {</div><div>-      theMap = new CoverageMap( lowAddress, highAddress );</div><div>+      theMap = new CoverageMap( fileName, lowAddress, highAddress );</div><div>       coverageMaps[ symbolName ] = theMap;</div><div>     } else {</div><div>       theMap = itr->second;</div><div>diff --git a/tester/covoar/ExecutableInfo.h b/tester/covoar/ExecutableInfo.h</div><div>index ca4184a..7242715 100644</div><div>--- a/tester/covoar/ExecutableInfo.h</div><div>+++ b/tester/covoar/ExecutableInfo.h</div><div>@@ -93,6 +93,7 @@ namespace Coverage {</div><div>     /*!</div><div>      *  This method creates a coverage map for the specified symbol.</div><div>      *</div><div>+     *  @param[in] exefileName specifies the source of the information</div><div>      *  @param[in] symbolName specifies the name of the symbol</div><div>      *  @param[in] lowAddress specifies the low address of the coverage map</div><div>      *  @param[in] highAddress specifies the high address of the coverage map</div><div>@@ -100,6 +101,7 @@ namespace Coverage {</div><div>      *  @return Returns a pointer to the coverage map</div><div>      */</div><div>     CoverageMapBase* createCoverageMap (</div><div>+      const std::string& exefileName,</div><div>       const std::string& symbolName,</div><div>       uint32_t           lowAddress,</div><div>       uint32_t           highAddress</div><div>diff --git a/tester/covoar/ObjdumpProcessor.cc b/tester/covoar/ObjdumpProcessor.cc</div><div>index 71c798d..5c9b6a0 100644</div><div>--- a/tester/covoar/ObjdumpProcessor.cc</div><div>+++ b/tester/covoar/ObjdumpProcessor.cc</div><div>@@ -97,7 +97,7 @@ namespace Coverage {</div><div> </div><div>     // Create a coverage map for the symbol.</div><div>     aCoverageMap = executableInfo->createCoverageMap(</div><div>-      symbolName, lowAddress, endAddress</div><div>+      executableInfo->getFileName().c_str(), symbolName, lowAddress, endAddress</div><div>     );</div><div> </div><div>     if (aCoverageMap) {</div><div>@@ -112,7 +112,7 @@ namespace Coverage {</div><div> </div><div>       // Create a unified coverage map for the symbol.</div><div>       SymbolsToAnalyze->createCoverageMap(</div><div>-        symbolName, endAddress - lowAddress + 1, executableInfo</div><div>+        executableInfo->getFileName().c_str(), symbolName, endAddress - lowAddress + 1</div><div>       );</div><div>     }</div><div>   }</div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index 53abf43..eb6e761 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -371,5 +371,5 @@ if __name__ == "__main__":</div><div>     print "coverage main"</div><div>     c = coverage_run("/home/hf/coverage_test_leon2","/home/hf/development/rtems/src/rtems-tools/tester")</div><div>     c.prepareEnvironment()</div><div>-    c.executables = ["/home/hf/development/rtems/src/b-leon2/sparc-rtems4.11/c/leon2/testsuites/samples/hello/hello.exe"]</div><div>+    c.executables = ["/home/hf/development/rtems/src/b-leon2/sparc-rtems4.11/c/leon2/testsuites/samples/hello/hello.ralf"]</div><div>     c.run()</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From ac004cfba2aecde267322f2d8d5e40c5732933ea Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Fri, 26 Jun 2015 01:17:17 +0200</div><div>Subject: [PATCH 09/18] added some debug output</div><div><br></div><div>---</div><div> tester/covoar/DesiredSymbols.cc                 |  4 +-</div><div> tester/covoar/ObjdumpProcessor.cc               |  5 +++</div><div> tester/covoar/qemu-traces.h                     |  1 +</div><div> tester/rtems/testing/coverage/symbolSets.config | 56 -------------------------</div><div> 4 files changed, 8 insertions(+), 58 deletions(-)</div><div><br></div><div>diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc</div><div>index f00c2c5..d2595f2 100644</div><div>--- a/tester/covoar/DesiredSymbols.cc</div><div>+++ b/tester/covoar/DesiredSymbols.cc</div><div>@@ -368,9 +368,9 @@ namespace Coverage {</div><div>           stderr,</div><div>           "ERROR: DesiredSymbols::createCoverageMap - Attempt to create "</div><div>           "unified coverage maps for %s with different sizes (%s/%d != %s/%d)\n",</div><div>-          exefileName.c_str(),</div><div>-          symbolName.c_str(),</div><div>           </div><div>+          symbolName.c_str(),</div><div>+          exefileName.c_str(),</div><div>           itr->second.stats.sizeInBytes,</div><div>           itr->second.sourceFile->getFileName().c_str(),</div><div>           size</div><div>diff --git a/tester/covoar/ObjdumpProcessor.cc b/tester/covoar/ObjdumpProcessor.cc</div><div>index 5c9b6a0..ee83d13 100644</div><div>--- a/tester/covoar/ObjdumpProcessor.cc</div><div>+++ b/tester/covoar/ObjdumpProcessor.cc</div><div>@@ -108,7 +108,12 @@ namespace Coverage {</div><div>            itr++ ) {</div><div> </div><div>         aCoverageMap->setIsStartOfInstruction( itr->address );</div><div>+        if (strcmp(symbolName.c_str(), "_Thread_Handler"))</div><div>+        {</div><div>+          fprintf(stderr, "%s\n", itr->line.c_str());</div><div>+        }</div><div>       }</div><div>+      </div><div> </div><div>       // Create a unified coverage map for the symbol.</div><div>       SymbolsToAnalyze->createCoverageMap(</div><div>diff --git a/tester/covoar/qemu-traces.h b/tester/covoar/qemu-traces.h</div><div>index 7e37840..1bee66f 100644</div><div>--- a/tester/covoar/qemu-traces.h</div><div>+++ b/tester/covoar/qemu-traces.h</div><div>@@ -33,6 +33,7 @@</div><div> </div><div> /* XXX really not always right */</div><div> /* XXX Added for covoar so this compiles */</div><div>+//typedef uint32_t target_ulong;</div><div> typedef uint32_t target_ulong;</div><div> </div><div> /* File header definition.  */</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index fcad5a3..9ec44d7 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -1,59 +1,3 @@</div><div> symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>name=core</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>-symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>name=developmental</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/librfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdosfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdevfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libimfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libcsupport/libcsupport.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstackchk.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libbspcmdline.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libcpuuse.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstringto.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdevnull.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdumpbuf.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libblock/libblock.a</div><div>-symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">        </span>name=score</div><div> <span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>-symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>name=sapi</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>-symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>name=rtems</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>-symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>name=filesystems</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdevfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdosfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libimfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/librfs.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libjffs2.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libfs/libdefaultfs.a</div><div>-symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>name=libmisc</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstackchk.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libbspcmdline.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libcpuuse.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libstringto.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdevnull.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libmisc/libdumpbuf.a</div><div>-symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>name=libcsupport</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libcsupport/libcsupport.a</div><div>-symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>name=libblock</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/libblock/libblock.a</div><div>-symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>name=posix</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/posix/libposix.a</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 10c0d5a9dd8c01ef1a82945669e9ae47d384678f Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Fri, 26 Jun 2015 20:51:56 +0200</div><div>Subject: [PATCH 10/18] removed some debug outputs which were needed to find</div><div> the byte size differences when analyzing the obj dumps</div><div><br></div><div>---</div><div> tester/covoar/ObjdumpProcessor.cc               | 4 ----</div><div> tester/rt/coverage.py                           | 2 +-</div><div> tester/rtems/testing/coverage/symbolSets.config | 4 +++-</div><div> 3 files changed, 4 insertions(+), 6 deletions(-)</div><div><br></div><div>diff --git a/tester/covoar/ObjdumpProcessor.cc b/tester/covoar/ObjdumpProcessor.cc</div><div>index ee83d13..851dc56 100644</div><div>--- a/tester/covoar/ObjdumpProcessor.cc</div><div>+++ b/tester/covoar/ObjdumpProcessor.cc</div><div>@@ -108,10 +108,6 @@ namespace Coverage {</div><div>            itr++ ) {</div><div> </div><div>         aCoverageMap->setIsStartOfInstruction( itr->address );</div><div>-        if (strcmp(symbolName.c_str(), "_Thread_Handler"))</div><div>-        {</div><div>-          fprintf(stderr, "%s\n", itr->line.c_str());</div><div>-        }</div><div>       }</div><div>       </div><div> </div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index eb6e761..6dc86c7 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -256,7 +256,7 @@ class covoar(object):</div><div>             log.stderr("Skipping " + setName)</div><div>             return</div><div> </div><div>-        command = "covoar -v -C" + covoarConfigFile + " -S " + symbolFile + " -O " + covoarResultDir + " " + path.join(self.tracesDir, "*.exe")</div><div>+        command = "covoar -C" + covoarConfigFile + " -S " + symbolFile + " -O " + covoarResultDir + " " + path.join(self.tracesDir, "*.exe")</div><div>         log.notice("Running covoar for " + setName, stdout_only=True)</div><div>         log.notice(command, stdout_only=True)</div><div>         executor = execute.execute(verbose=True, output=output_handler)</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index 9ec44d7..47c6323 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -1,3 +1,5 @@</div><div> symbolset:</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>name=score</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>name=core</div><div> <span class="Apple-tab-span" style="white-space:pre">  </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From e842cc5234cf600c81851853821062cdfe5c5898 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Tue, 14 Jul 2015 17:39:57 +0200</div><div>Subject: [PATCH 11/18] changed <br> tag in html report generator</div><div><br></div><div>---</div><div> tester/covoar/ReportsHtml.cc | 42 +++++++++++++++++++++---------------------</div><div> 1 file changed, 21 insertions(+), 21 deletions(-)</div><div><br></div><div>diff --git a/tester/covoar/ReportsHtml.cc b/tester/covoar/ReportsHtml.cc</div><div>index 101c76b..80d3a43 100644</div><div>--- a/tester/covoar/ReportsHtml.cc</div><div>+++ b/tester/covoar/ReportsHtml.cc</div><div>@@ -69,7 +69,7 @@ namespace Coverage {</div><div>     if (projectName)</div><div>       fprintf(</div><div>         aFile,</div><div>-         "%s</br>",</div><div>+         "%s<br>",</div><div>          projectName</div><div>       );</div><div> </div><div>@@ -144,7 +144,7 @@ namespace Coverage {</div><div>     if (projectName)</div><div>       fprintf(</div><div>         aFile,</div><div>-         "%s</br>",</div><div>+         "%s<br>",</div><div>          projectName</div><div>       );</div><div> </div><div>@@ -181,7 +181,7 @@ namespace Coverage {</div><div>       if (projectName)</div><div>         fprintf(</div><div>           aFile,</div><div>-          "%s</br>",</div><div>+          "%s<br>",</div><div>           projectName</div><div>         );</div><div> </div><div>@@ -197,7 +197,7 @@ namespace Coverage {</div><div>         "<th class=\"table-sortable:default\" align=\"left\">Symbol</th>\n"</div><div>         "<th class=\"table-sortable:default\" align=\"left\">Line</th>\n"</div><div>         "<th class=\"table-filterable table-sortable:default\" align=\"left\">File</th>\n"</div><div>-        "<th class=\"table-sortable:numeric\" align=\"left\">Size </br>Bytes</th>\n"</div><div>+        "<th class=\"table-sortable:numeric\" align=\"left\">Size <br>Bytes</th>\n"</div><div>         "<th class=\"table-sortable:default\" align=\"left\">Reason</th>\n"</div><div>         "<th class=\"table-filterable table-sortable:default\" align=\"left\">Taken</th>\n"</div><div> <span class="Apple-tab-span" style="white-space:pre">  </span>"<th class=\"table-filterable table-sortable:default\" align=\"left\">Not Taken</th>\n"</div><div>@@ -232,7 +232,7 @@ namespace Coverage {</div><div>     if (projectName)</div><div>       fprintf(</div><div>         aFile,</div><div>-        "%s</br>",</div><div>+        "%s<br>",</div><div>         projectName</div><div>       );</div><div> </div><div>@@ -248,8 +248,8 @@ namespace Coverage {</div><div>       "<th class=\"table-sortable:default\" align=\"left\">Symbol</th>\n"</div><div>       "<th class=\"table-sortable:default\" align=\"left\">Range</th>\n"</div><div>       "<th class=\"table-filterable table-sortable:default\" align=\"left\">File</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"left\">Size </br>Bytes</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"left\">Size </br>Instructions</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"left\">Size <br>Bytes</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"left\">Size <br>Instructions</th>\n"</div><div>       "<th class=\"table-filterable table-sortable:default\" align=\"left\">Classification</th>\n"</div><div>       "<th class=\"table-sortable:default\" align=\"left\">Explanation</th>\n"</div><div>       "</tr>\n"</div><div>@@ -281,7 +281,7 @@ namespace Coverage {</div><div>     if (projectName)</div><div>       fprintf(</div><div>         aFile,</div><div>-        "%s</br>",</div><div>+        "%s<br>",</div><div>         projectName</div><div>       );</div><div> </div><div>@@ -326,7 +326,7 @@ namespace Coverage {</div><div>     if (projectName)</div><div>       fprintf(</div><div>         aFile,</div><div>-        "%s</br>",</div><div>+        "%s<br>",</div><div>         projectName</div><div>       );</div><div> </div><div>@@ -371,7 +371,7 @@ namespace Coverage {</div><div>     if (projectName)</div><div>       fprintf(</div><div>         aFile,</div><div>-        "%s</br>",</div><div>+        "%s<br>",</div><div>         projectName</div><div>       );</div><div> </div><div>@@ -385,16 +385,16 @@ namespace Coverage {</div><div>       "<thead>\n"</div><div>       "<tr>\n"</div><div>       "<th class=\"table-sortable:default\" align=\"center\">Symbol</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">Total</br>Size</br>Bytes</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">Total</br>Size</br>Instr</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">#</br>Ranges</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">Uncovered</br>Size</br>Bytes</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">Uncovered</br>Size</br>Instr</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">#</br>Branches</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">#</br>Always</br>Taken</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">#</br>Never</br>Taken</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">Percent</br>Uncovered</br>Instructions</th>\n"</div><div>-      "<th class=\"table-sortable:numeric\" align=\"center\">Percent</br>Uncovered</br>Bytes</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">Total<br>Size<br>Bytes</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">Total<br>Size<br>Instr</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">#<br>Ranges</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">Uncovered<br>Size<br>Bytes</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">Uncovered<br>Size<br>Instr</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">#<br>Branches</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">#<br>Always<br>Taken</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">#<br>Never<br>Taken</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">Percent<br>Uncovered<br>Instructions</th>\n"</div><div>+      "<th class=\"table-sortable:numeric\" align=\"center\">Percent<br>Uncovered<br>Bytes</th>\n"</div><div>       "</tr>\n"</div><div>       "</thead>\n"</div><div>       "<tbody>\n",</div><div>@@ -728,7 +728,7 @@ namespace Coverage {</div><div>     // Range</div><div>     fprintf( </div><div>       report, </div><div>-      "<td class=\"covoar-td\" align=\"center\"><a href =\"annotated.html#range%d\">%s </br>%s</td>\n",</div><div>+      "<td class=\"covoar-td\" align=\"center\"><a href =\"annotated.html#range%d\">%s <br>%s</td>\n",</div><div>       rangePtr->id,    </div><div>       rangePtr->lowSourceLine.c_str(),</div><div>       rangePtr->highSourceLine.c_str()</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From a5ecb908c39ba1b84f638476c426b2770c32b52e Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Tue, 4 Aug 2015 12:33:10 +0200</div><div>Subject: [PATCH 12/18] added 'rtems-cpukit' parameter to replace hardcoded</div><div> paths in symbolSets.config file</div><div><br></div><div>---</div><div> tester/covoar/DesiredSymbols.cc                 |  9 +++++++--</div><div> tester/rt/coverage.py                           | 14 ++++++++++----</div><div> tester/rt/options.py                            |  2 +-</div><div> tester/rt/test.py                               |  9 +++++++--</div><div> tester/rtems/testing/coverage/symbolSets.config |  6 +++---</div><div> 5 files changed, 28 insertions(+), 12 deletions(-)</div><div><br></div><div>diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc</div><div>index d2595f2..a4b7868 100644</div><div>--- a/tester/covoar/DesiredSymbols.cc</div><div>+++ b/tester/covoar/DesiredSymbols.cc</div><div>@@ -364,9 +364,13 @@ namespace Coverage {</div><div>       // ensure that the specified size matches the existing size.</div><div>       if (itr->second.stats.sizeInBytes != size) {</div><div> </div><div>+        // Changed ERROR to INFO because size mismatch is not treated as error anymore. </div><div>+        // Set smallest size as size and continue. </div><div>+        // Update value for longer byte size. </div><div>+        // 2015-07-22</div><div>         fprintf(</div><div>           stderr,</div><div>-          "ERROR: DesiredSymbols::createCoverageMap - Attempt to create "</div><div>+          "INFO: DesiredSymbols::createCoverageMap - Attempt to create "</div><div>           "unified coverage maps for %s with different sizes (%s/%d != %s/%d)\n",</div><div>           </div><div>           symbolName.c_str(),</div><div>@@ -658,6 +662,7 @@ namespace Coverage {</div><div> </div><div>     // Ensure that the source and destination coverage maps</div><div>     // are the same size.</div><div>+    // Changed from ERROR msg to INFO, because size mismatch is not treated as error anymore. 2015-07-20</div><div>     dMapSize = itr->second.stats.sizeInBytes;</div><div>     sBaseAddress = sourceCoverageMap->getFirstLowAddress();</div><div>     sMapSize = sourceCoverageMap->getSize();</div><div>@@ -665,7 +670,7 @@ namespace Coverage {</div><div> </div><div>       fprintf(</div><div>         stderr,</div><div>-        "ERROR: DesiredSymbols::mergeCoverageMap - Unable to merge "</div><div>+        "INFO: DesiredSymbols::mergeCoverageMap - Unable to merge "</div><div>         "coverage map for %s because the sizes are different\n",</div><div>         symbolName.c_str()</div><div>       );</div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index 6dc86c7..beac357 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -11,6 +11,8 @@ import shutil</div><div> import os</div><div> from datetime import datetime</div><div> </div><div>+import options</div><div>+</div><div> class summary:</div><div>     def __init__(self, p_summaryDir):</div><div>         self.summaryFilePath = path.join(p_summaryDir, "summary.txt")</div><div>@@ -179,7 +181,7 @@ class symbolsConfiguration(object):</div><div>                     name=SYMBOLSET_NAME_N</div><div>                     lib=PATH_TO_LIBRARY        ''')</div><div> </div><div>-    def load(self, symbolSetConfigFile):</div><div>+    def load(self, symbolSetConfigFile, path_to_cpukit):</div><div>         scf = open(symbolSetConfigFile, 'r')</div><div>         for line in scf:</div><div>             try:</div><div>@@ -190,10 +192,13 @@ class symbolsConfiguration(object):</div><div>                     if(len(splitted) == 2):</div><div>                         key = splitted[0].strip()</div><div>                         value = splitted[1].strip()</div><div>+</div><div>                         if key == 'name':</div><div>                             self.symbolSets[-1].name = value</div><div>                         elif key == 'lib':</div><div>-                            self.symbolSets[-1].libs.append(value)</div><div>+                            lib = os.path.join(path_to_cpukit, value)</div><div>+                            log.stderr(lib + "\n")</div><div>+                            self.symbolSets[-1].libs.append(lib)</div><div>                         else:</div><div>                             log.stderr("Invalid key : " + key + " in symbol set configuration file " + symbolSetConfigFile)</div><div>                     else:</div><div>@@ -277,7 +282,7 @@ class coverage_run(object):</div><div>     Coverage analysis support for rtems-test</div><div>     '''</div><div> </div><div>-    def __init__(self, p_macros):</div><div>+    def __init__(self, p_macros, path_to_cpukit):</div><div>         '''</div><div>         Constructor</div><div>         '''</div><div>@@ -292,6 +297,7 @@ class coverage_run(object):</div><div>         self.config_map = self.macros.macros['coverage']</div><div>         self.executables = None</div><div>         self.symbolSets = []</div><div>+        self.path_to_cpukit = path_to_cpukit</div><div> </div><div>     def prepareEnvironment(self):</div><div>         if(path.exists(self.tracesDir)):</div><div>@@ -327,7 +333,7 @@ class coverage_run(object):</div><div>         self._linkExecutables()</div><div> </div><div>         symbolConfig = symbolsConfiguration()</div><div>-        symbolConfig.load(self.symbolConfigPath)</div><div>+        symbolConfig.load(self.symbolConfigPath, self.path_to_cpukit)</div><div> </div><div>         for sset in symbolConfig.symbolSets:</div><div>             if sset.isValid():</div><div>diff --git a/tester/rt/options.py b/tester/rt/options.py</div><div>index a916cbb..ff4ea60 100644</div><div>--- a/tester/rt/options.py</div><div>+++ b/tester/rt/options.py</div><div>@@ -1,6 +1,6 @@</div><div> #</div><div> # RTEMS Tools Project (<a href="http://www.rtems.org/">http://www.rtems.org/</a>)</div><div>-# Copyright 2013-2015 Chris Johns (<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>)</div><div>+        # Copyright 2013-2015 Chris Johns (<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>)</div><div> # All rights reserved.</div><div> #</div><div> # This file is part of the RTEMS Tools package in 'rtems-tools'.</div><div>diff --git a/tester/rt/test.py b/tester/rt/test.py</div><div>index 6fd0f6e..ad4e600 100644</div><div>--- a/tester/rt/test.py</div><div>+++ b/tester/rt/test.py</div><div>@@ -198,7 +198,8 @@ def run(command_path = None):</div><div>                     '--debug-trace': 'Debug trace based on specific flags',</div><div>                     '--filter':      'Glob that executables must match to run (default: ' +</div><div>                               default_exefilter + ')',</div><div>-                    '--stacktrace':  'Dump a stack trace on a user termination (^C)'}</div><div>+                    '--stacktrace':  'Dump a stack trace on a user termination (^C)',</div><div>+                    '--rtems-cpukit': 'The path to the cpukit directory ( including /cpukit )'}</div><div>         opts = options.load(sys.argv,</div><div>                             optargs = optargs,</div><div>                             command_path = command_path)</div><div>@@ -248,7 +249,11 @@ def run(command_path = None):</div><div>             opts.defaults.load('%%{_configdir}/<a href="http://coverage.mc">coverage.mc</a>')</div><div>             if not check.check_exe('__covoar', opts.defaults['__covoar']):</div><div>                 raise error.general("Covoar not found!")</div><div>-            coverage = coverage.coverage_run(opts.defaults)</div><div>+</div><div>+            path_to_cpukit = opts.find_arg('--rtems-cpukit')</div><div>+            if not path_to_cpukit:</div><div>+                raise error.general("Path to cpukit directory not provided")</div><div>+            coverage = coverage.coverage_run(opts.defaults, path_to_cpukit[1])</div><div>             coverage.prepareEnvironment();</div><div> </div><div>         report_mode = opts.find_arg('--report-mode')</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index 47c6323..fb2273e 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -1,5 +1,5 @@</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">        </span>name=core</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=/home/hf/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=rtems/librtems.a</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 4e2d9310b835f605fd89777797a6c30611553026 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Tue, 4 Aug 2015 17:16:00 +0200</div><div>Subject: [PATCH 13/18] changes such that when executing rtems-test the path to</div><div> the test cases does not have to be absolute anymore</div><div><br></div><div>---</div><div> tester/rt/coverage.py                           | 10 +++++-----</div><div> tester/rt/test.py                               | 16 +++++++++-------</div><div> tester/rtems/testing/coverage/symbolSets.config |  6 +++---</div><div> 3 files changed, 17 insertions(+), 15 deletions(-)</div><div><br></div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index beac357..32195cf 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -181,7 +181,7 @@ class symbolsConfiguration(object):</div><div>                     name=SYMBOLSET_NAME_N</div><div>                     lib=PATH_TO_LIBRARY        ''')</div><div> </div><div>-    def load(self, symbolSetConfigFile, path_to_cpukit):</div><div>+    def load(self, symbolSetConfigFile, path_to_builddir):</div><div>         scf = open(symbolSetConfigFile, 'r')</div><div>         for line in scf:</div><div>             try:</div><div>@@ -196,7 +196,7 @@ class symbolsConfiguration(object):</div><div>                         if key == 'name':</div><div>                             self.symbolSets[-1].name = value</div><div>                         elif key == 'lib':</div><div>-                            lib = os.path.join(path_to_cpukit, value)</div><div>+                            lib = os.path.join(path_to_builddir, value)</div><div>                             log.stderr(lib + "\n")</div><div>                             self.symbolSets[-1].libs.append(lib)</div><div>                         else:</div><div>@@ -282,7 +282,7 @@ class coverage_run(object):</div><div>     Coverage analysis support for rtems-test</div><div>     '''</div><div> </div><div>-    def __init__(self, p_macros, path_to_cpukit):</div><div>+    def __init__(self, p_macros, path_to_builddir):</div><div>         '''</div><div>         Constructor</div><div>         '''</div><div>@@ -297,7 +297,7 @@ class coverage_run(object):</div><div>         self.config_map = self.macros.macros['coverage']</div><div>         self.executables = None</div><div>         self.symbolSets = []</div><div>-        self.path_to_cpukit = path_to_cpukit</div><div>+        self.path_to_builddir= path_to_builddir</div><div> </div><div>     def prepareEnvironment(self):</div><div>         if(path.exists(self.tracesDir)):</div><div>@@ -333,7 +333,7 @@ class coverage_run(object):</div><div>         self._linkExecutables()</div><div> </div><div>         symbolConfig = symbolsConfiguration()</div><div>-        symbolConfig.load(self.symbolConfigPath, self.path_to_cpukit)</div><div>+        symbolConfig.load(self.symbolConfigPath, self.path_to_builddir)</div><div> </div><div>         for sset in symbolConfig.symbolSets:</div><div>             if sset.isValid():</div><div>diff --git a/tester/rt/test.py b/tester/rt/test.py</div><div>index ad4e600..cbe7332 100644</div><div>--- a/tester/rt/test.py</div><div>+++ b/tester/rt/test.py</div><div>@@ -125,9 +125,10 @@ class test_run(object):</div><div>         if self.test:</div><div>             self.test.kill()</div><div> </div><div>-def find_executables(paths, glob):</div><div>+def find_executables(paths, glob, path_to_builddir):</div><div>     executables = []</div><div>     for p in paths:</div><div>+        p = os.path.join(path_to_builddir, p)</div><div>         if path.isfile(p):</div><div>             executables += [p]</div><div>         elif path.isdir(p):</div><div>@@ -199,7 +200,7 @@ def run(command_path = None):</div><div>                     '--filter':      'Glob that executables must match to run (default: ' +</div><div>                               default_exefilter + ')',</div><div>                     '--stacktrace':  'Dump a stack trace on a user termination (^C)',</div><div>-                    '--rtems-cpukit': 'The path to the cpukit directory ( including /cpukit )'}</div><div>+                    '--rtems-builddir': 'The path to the build directory ( including e.g. /b-leon2/ )'}</div><div>         opts = options.load(sys.argv,</div><div>                             optargs = optargs,</div><div>                             command_path = command_path)</div><div>@@ -241,6 +242,10 @@ def run(command_path = None):</div><div>             raise error.general('BSP script not found: %s' % (bsp))</div><div>         bsp_config = opts.defaults.expand(opts.defaults[bsp])</div><div> </div><div>+        path_to_builddir= opts.find_arg('--rtems-builddir')</div><div>+        if not path_to_builddir:</div><div>+            raise error.general("Path to build directory not provided")</div><div>+</div><div>         coverage_enabled = opts.coverage()</div><div>         if coverage_enabled:</div><div>             import coverage</div><div>@@ -250,10 +255,7 @@ def run(command_path = None):</div><div>             if not check.check_exe('__covoar', opts.defaults['__covoar']):</div><div>                 raise error.general("Covoar not found!")</div><div> </div><div>-            path_to_cpukit = opts.find_arg('--rtems-cpukit')</div><div>-            if not path_to_cpukit:</div><div>-                raise error.general("Path to cpukit directory not provided")</div><div>-            coverage = coverage.coverage_run(opts.defaults, path_to_cpukit[1])</div><div>+            coverage = coverage.coverage_run(opts.defaults, path_to_builddir[1])</div><div>             coverage.prepareEnvironment();</div><div> </div><div>         report_mode = opts.find_arg('--report-mode')</div><div>@@ -265,7 +267,7 @@ def run(command_path = None):</div><div>             report_mode = report_mode[1]</div><div>         else:</div><div>             report_mode = 'failures'</div><div>-        executables = find_executables(opts.params(), exe_filter)</div><div>+        executables = find_executables(opts.params(), exe_filter, path_to_builddir[1])</div><div>         if len(executables) == 0:</div><div>             raise error.general('no executables supplied')</div><div>         start_time = datetime.datetime.now()</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index fb2273e..4b90fc7 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -1,5 +1,5 @@</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">      </span>name=core</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>lib=sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>lib=rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From d6bf24717d188b83059b05e4e2b6f3856fa83b8f Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Tue, 4 Aug 2015 18:20:46 +0200</div><div>Subject: [PATCH 14/18] small fixes in html report generator</div><div><br></div><div>---</div><div> tester/covoar/ReportsHtml.cc | 4 ++--</div><div> 1 file changed, 2 insertions(+), 2 deletions(-)</div><div><br></div><div>diff --git a/tester/covoar/ReportsHtml.cc b/tester/covoar/ReportsHtml.cc</div><div>index 80d3a43..247253c 100644</div><div>--- a/tester/covoar/ReportsHtml.cc</div><div>+++ b/tester/covoar/ReportsHtml.cc</div><div>@@ -52,7 +52,7 @@ namespace Coverage {</div><div>     #define PRINT_TEXT_ITEM( _t, _n ) \</div><div>        fprintf( \</div><div>          aFile, \</div><div>-         "<li>%s (<a href=\"%s\">text</a>)\n", \</div><div>+         "<li>%s (<a href=\"%s\">text</a>)</li>\n", \</div><div>         _t, _n );</div><div> </div><div>     FILE*  aFile;</div><div>@@ -93,7 +93,7 @@ namespace Coverage {</div><div> </div><div>     fprintf(</div><div>       aFile,</div><div>-      "</li>\n"</div><div>+      "</ul>\n"</div><div>       "<!-- INSERT PROJECT SPECIFIC ITEMS HERE -->\n"</div><div>       "</html>\n"</div><div>     );</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 47961f73d4ec991cc722262319fa13b72f67dee3 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Fri, 28 Aug 2015 18:49:07 +0200</div><div>Subject: [PATCH 15/18] Added debug messages to analyze gcov output</div><div><br></div><div>---</div><div> rtemstoolkit/macros.py                          |   2 +</div><div> tester/covoar/GcovData.cc                       | 731 ++++++++++++------------</div><div> tester/covoar/GcovFunctionData.cc               |   2 +-</div><div> tester/covoar/app_common.h                      |   2 +-</div><div> tester/rt/coverage.py                           |   2 +-</div><div> tester/rt/options.py                            |   2 +</div><div> tester/rt/test.py                               |   4 +</div><div> tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a>              |   2 +-</div><div> tester/rtems/testing/coverage/symbolSets.config |   4 +-</div><div> 9 files changed, 390 insertions(+), 361 deletions(-)</div><div><br></div><div>diff --git a/rtemstoolkit/macros.py b/rtemstoolkit/macros.py</div><div>index 8db0729..8cbef3f 100644</div><div>--- a/rtemstoolkit/macros.py</div><div>+++ b/rtemstoolkit/macros.py</div><div>@@ -73,6 +73,7 @@ class macros:</div><div>             self.read_map_locked = False</div><div>             self.write_map = 'global'</div><div>             self.rtpath = path.abspath(path.dirname(inspect.getfile(macros)))</div><div>+            print "rtpath " + self.rtpath + "\n"</div><div>             if path.dirname(self.rtpath).endswith('/share/rtems'):</div><div>                 self.prefix = path.dirname(self.rtpath)[:-len('/share/rtems')]</div><div>             else:</div><div>@@ -87,6 +88,7 @@ class macros:</div><div>                                                'required',</div><div>                                                path.abspath(self.expand(rtdir)))</div><div>             self.macros['global']['_rttop'] = ('dir', 'required', self.prefix)</div><div>+            print "prefix: " + str(self.macros['global']['_prefix']) + "\n"</div><div>         else:</div><div>             self.macros = {}</div><div>             for m in original.macros:</div><div>diff --git a/tester/covoar/GcovData.cc b/tester/covoar/GcovData.cc</div><div>index 6d10337..edaa1bf 100644</div><div>--- a/tester/covoar/GcovData.cc</div><div>+++ b/tester/covoar/GcovData.cc</div><div>@@ -28,7 +28,7 @@ namespace Gcov {</div><div> </div><div>   GcovData::GcovData()</div><div>   {</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  <span class="Apple-tab-span" style="white-space:pre"> </span>numberOfFunctions = 0;</div><div>+    numberOfFunctions = 0;</div><div>   }</div><div> </div><div>   GcovData::~GcovData()</div><div>@@ -43,12 +43,13 @@ namespace Gcov {</div><div>     char*<span class="Apple-tab-span" style="white-space:pre">            </span>tempString2;</div><div>     char*<span class="Apple-tab-span" style="white-space:pre">            </span>tempString3;</div><div> </div><div>+    fprintf(stdout, "filename: %s\n", fileName);</div><div>     if ( strlen(fileName) >= FILE_NAME_LENGTH ){</div><div>       fprintf(</div><div>-        stderr,</div><div>-        "ERROR: File name is too long to be correctly stored: %u\n",</div><div>-        (unsigned int) strlen(fileName)</div><div>-      );</div><div>+          stderr,</div><div>+          "ERROR: File name is too long to be correctly stored: %u\n",</div><div>+          (unsigned int) strlen(fileName)</div><div>+          );</div><div>       return false;</div><div>     }</div><div>     strcpy( gcnoFileName, fileName );</div><div>@@ -70,23 +71,29 @@ namespace Gcov {</div><div>     }</div><div> </div><div>     // Debug message</div><div>-    // fprintf( stderr, "Readning file: %s\n",  gcnoFileName);</div><div>+    fprintf( stderr, "Readning file: %s\n",  gcnoFileName);</div><div> </div><div>     // Open the notes file.</div><div>     gcovFile = fopen( gcnoFileName, "r" );</div><div>     if ( !gcovFile ) {</div><div>-    <span class="Apple-tab-span" style="white-space:pre">    </span>fprintf( stderr, "Unable to open %s\n", gcnoFileName );</div><div>-    <span class="Apple-tab-span" style="white-space:pre">     </span>return false;</div><div>+      fprintf( stderr, "Unable to open %s\n", gcnoFileName );</div><div>+      return false;</div><div>     }</div><div> </div><div>     // Read and validate the gcnoPreamble (magic, version, timestamp) from the file</div><div>     status = readFilePreamble( &gcnoPreamble, gcovFile, GCNO_MAGIC );</div><div>     if ( status <= 0 ){</div><div>-    <span class="Apple-tab-span" style="white-space:pre"> </span>fprintf( stderr, "Unable to read %s\n", gcnoFileName );</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>fclose( gcovFile );</div><div>-    <span class="Apple-tab-span" style="white-space:pre">   </span>return false;</div><div>+      fprintf( stderr, "Unable to read %s\n", gcnoFileName );</div><div>+      fclose( gcovFile );</div><div>+      return false;</div><div>+    }</div><div>+    else </div><div>+    {</div><div>+      fprintf( stdout, "Successfully read file preamble for %s.\n", gcnoFileName);</div><div>+      fprintf( stdout, "MAGIC: %u\n", gcnoPreamble.magic );</div><div>+      fprintf( stdout, "VERSION: %u\n", gcnoPreamble.version );</div><div>+      fprintf( stdout, "TIMESTAMP: %u\n", gcnoPreamble.timestamp );</div><div>     }</div><div>-</div><div>     //Read all remaining frames from file</div><div>     while( readFrame(gcovFile) ){}</div><div> </div><div>@@ -97,371 +104,375 @@ namespace Gcov {</div><div> </div><div>   bool GcovData::writeGcdaFile ()</div><div>   {</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  gcov_preamble <span class="Apple-tab-span" style="white-space:pre">           </span>preamble;</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  gcov_frame_header<span class="Apple-tab-span" style="white-space:pre">                </span>header;</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  FILE*<span class="Apple-tab-span" style="white-space:pre">                            </span>gcdaFile;</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  functions_iterator_t<span class="Apple-tab-span" style="white-space:pre">     </span>currentFunction;</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  arcs_iterator_t<span class="Apple-tab-span" style="white-space:pre">          </span>currentArc;</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  uint32_t<span class="Apple-tab-span" style="white-space:pre">                 </span>buffer;</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  uint32_t<span class="Apple-tab-span" style="white-space:pre">                 </span>countersFound;</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  uint32_t<span class="Apple-tab-span" style="white-space:pre">                 </span>countersFoundSum;</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  uint64_t<span class="Apple-tab-span" style="white-space:pre">                 </span>countersSum;</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  uint64_t<span class="Apple-tab-span" style="white-space:pre">                 </span>countersMax;</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  uint64_t<span class="Apple-tab-span" style="white-space:pre">                 </span>llBuffer[4096];<span class="Apple-tab-span" style="white-space:pre">             </span>// TODO: Use common buffer</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  gcov_statistics<span class="Apple-tab-span" style="white-space:pre">          </span>objectStats;</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  gcov_statistics<span class="Apple-tab-span" style="white-space:pre">          </span>programStats;</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  size_t<span class="Apple-tab-span" style="white-space:pre">                   </span>status;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  // Debug message</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  // fprintf( stderr, "Writing file: %s\n",  gcdaFileName);</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  // Lets clear counters sumators</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  countersSum <span class="Apple-tab-span" style="white-space:pre">             </span>= 0;</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  countersMax <span class="Apple-tab-span" style="white-space:pre">             </span>= 0;</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  countersFoundSum <span class="Apple-tab-span" style="white-space:pre">        </span>= 0;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  // Open the data file.</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  gcdaFile = fopen( gcdaFileName, "w" );</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  if ( !gcdaFile ) {</div><div>-<span class="Apple-tab-span" style="white-space:pre">               </span>  fprintf( stderr, "Unable to create %s\n", gcdaFileName );</div><div>-<span class="Apple-tab-span" style="white-space:pre">              </span>  return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  }</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  //Form preamble</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  preamble.magic<span class="Apple-tab-span" style="white-space:pre">   </span>= GCDA_MAGIC;</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  preamble.version<span class="Apple-tab-span" style="white-space:pre"> </span>= gcnoPreamble.version;</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  preamble.timestamp<span class="Apple-tab-span" style="white-space:pre">       </span>= gcnoPreamble.timestamp;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  //Write preamble</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  status = fwrite (&preamble , sizeof( preamble ), 1 , gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  if ( status != 1 )</div><div>-            fprintf( stderr, "Error while writing gcda preamble to a file %s\n", gcdaFileName );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  //Write function info and counter counts</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  for (</div><div>-<span class="Apple-tab-span" style="white-space:pre">                    </span>  currentFunction = functions.begin();</div><div>-<span class="Apple-tab-span" style="white-space:pre">                     </span>  currentFunction != functions.end();</div><div>-<span class="Apple-tab-span" style="white-space:pre">                      </span>  currentFunction++</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  )</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  {</div><div>-<span class="Apple-tab-span" style="white-space:pre">                </span>  //Write function announcement frame header (length always equals 2)</div><div>-<span class="Apple-tab-span" style="white-space:pre">              </span>  header.tag = GCOV_TAG_FUNCTION;</div><div>-<span class="Apple-tab-span" style="white-space:pre">          </span>  header.length = 2;</div><div>-<span class="Apple-tab-span" style="white-space:pre">               </span>  status = fwrite (&header, sizeof(header), 1, gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>          if ( status != 1 )</div><div>-                    fprintf( stderr, "Error while writing function announcement to a file %s\n", gcdaFileName );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">               </span>  //Write function id</div><div>-<span class="Apple-tab-span" style="white-space:pre">              </span>  buffer = (*currentFunction)->getId();</div><div>-<span class="Apple-tab-span" style="white-space:pre">         </span>  status = fwrite (&buffer, sizeof( buffer ), 1, gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>          if ( status != 1 )</div><div>-                    fprintf( stderr, "Error while writing function id to a file %s\n", gcdaFileName );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">         </span>  //Write function checksum</div><div>-<span class="Apple-tab-span" style="white-space:pre">                </span>  buffer = (*currentFunction)->getChecksum();</div><div>-<span class="Apple-tab-span" style="white-space:pre">           </span>  status = fwrite (&buffer, sizeof( buffer ), 1, gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>          if ( status != 1 )</div><div>-                    fprintf( stderr, "Error while writing function checksum to a file %s\n", gcdaFileName );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">           </span>  // Determine how many counters there are</div><div>-<span class="Apple-tab-span" style="white-space:pre">         </span>  // and store their counts in buffer</div><div>-<span class="Apple-tab-span" style="white-space:pre">              </span>  countersFound = 0;</div><div>-<span class="Apple-tab-span" style="white-space:pre">               </span>  (*currentFunction)->getCounters( llBuffer, countersFound, countersSum, countersMax );</div><div>-<span class="Apple-tab-span" style="white-space:pre">         </span>  countersFoundSum += countersFound;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">               </span>  //Write info about counters</div><div>-<span class="Apple-tab-span" style="white-space:pre">              </span>  header.tag = GCOV_TAG_COUNTER;</div><div>-<span class="Apple-tab-span" style="white-space:pre">           </span>  header.length = countersFound * 2;</div><div>-<span class="Apple-tab-span" style="white-space:pre">               </span>  status = fwrite (&header, sizeof( header ), 1, gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>          if ( status != 1 )</div><div>-                    fprintf( stderr, "Error while writing counter header to a file %s\n", gcdaFileName );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">              </span>  status = fwrite (llBuffer, sizeof( uint64_t ), countersFound , gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>          if ( status != countersFound )</div><div>-                    fprintf( stderr, "Error while writing counter data to a file %s\n", gcdaFileName );</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  }</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  // Prepare frame with object file statistics</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  header.tag = GCOV_TAG_OBJECT_SUMMARY;</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  header.length = 9;</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  objectStats.checksum = 0;<span class="Apple-tab-span" style="white-space:pre">                        </span>// TODO: have no idea hov to calculates it :)</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  objectStats.counters = countersFoundSum;</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  objectStats.runs = 1;<span class="Apple-tab-span" style="white-space:pre">                            </span>// We are lying for now, we have no means of figuring this out</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  objectStats.sum = countersSum;<span class="Apple-tab-span" style="white-space:pre">           </span>// Sum of all counters</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  objectStats.max = countersMax;<span class="Apple-tab-span" style="white-space:pre">           </span>// max value for counter on last run, we have no clue</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  objectStats.sumMax = countersMax;<span class="Apple-tab-span" style="white-space:pre">                </span>// we have no clue</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  // Write data</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  status = fwrite (&header, sizeof( header ), 1, gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  if ( status != 1 )</div><div>-            fprintf( stderr, "Error while writing stats header to a file %s\n", gcdaFileName );</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  status = fwrite (&objectStats, sizeof( objectStats ), 1, gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  if ( status != 1 )</div><div>-            fprintf( stderr, "Error while writing object stats to a file %s\n", gcdaFileName );</div><div>-</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  // Prepare frame with program statistics</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  header.tag = GCOV_TAG_PROGRAM_SUMMARY;</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  header.length = 9;</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  programStats.checksum = 0;<span class="Apple-tab-span" style="white-space:pre">                       </span>// TODO: have no idea hov to calculate it :)</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  programStats.counters = countersFoundSum;</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  programStats.runs = 1;<span class="Apple-tab-span" style="white-space:pre">                   </span>// We are lying for now, we have no clue</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  programStats.sum = countersSum;<span class="Apple-tab-span" style="white-space:pre">          </span>// Sum of all counters</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  programStats.max = countersMax;<span class="Apple-tab-span" style="white-space:pre">          </span>// max value for counter on last run, we have no clue</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  programStats.sumMax = countersMax;<span class="Apple-tab-span" style="white-space:pre">               </span>// we have no clue</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  // Write data</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  status = fwrite (&header, sizeof( header ), 1, gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  if ( status != 1 )</div><div>-            fprintf( stderr, "Error while writing stats header to a file %s\n", gcdaFileName );</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  status = fwrite (&programStats, sizeof( programStats ), 1, gcdaFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  if ( status != 1 )</div><div>-            fprintf( stderr, "Error while writing program stats to a file %s\n", gcdaFileName );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  fclose( gcdaFile );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  return true;</div><div>+    gcov_preamble <span class="Apple-tab-span" style="white-space:pre">         </span>preamble;</div><div>+    gcov_frame_header<span class="Apple-tab-span" style="white-space:pre">            </span>header;</div><div>+    FILE*<span class="Apple-tab-span" style="white-space:pre">                          </span>gcdaFile;</div><div>+    functions_iterator_t<span class="Apple-tab-span" style="white-space:pre"> </span>currentFunction;</div><div>+    arcs_iterator_t<span class="Apple-tab-span" style="white-space:pre">               </span>currentArc;</div><div>+    uint32_t<span class="Apple-tab-span" style="white-space:pre">                   </span>buffer;</div><div>+    uint32_t<span class="Apple-tab-span" style="white-space:pre">                       </span>countersFound;</div><div>+    uint32_t<span class="Apple-tab-span" style="white-space:pre">                        </span>countersFoundSum;</div><div>+    uint64_t<span class="Apple-tab-span" style="white-space:pre">                     </span>countersSum;</div><div>+    uint64_t<span class="Apple-tab-span" style="white-space:pre">                  </span>countersMax;</div><div>+    uint64_t<span class="Apple-tab-span" style="white-space:pre">                  </span>llBuffer[4096];<span class="Apple-tab-span" style="white-space:pre">             </span>// TODO: Use common buffer</div><div>+    gcov_statistics<span class="Apple-tab-span" style="white-space:pre">             </span>objectStats;</div><div>+    gcov_statistics<span class="Apple-tab-span" style="white-space:pre">           </span>programStats;</div><div>+    size_t<span class="Apple-tab-span" style="white-space:pre">                   </span>status;</div><div>+</div><div>+    // Debug message</div><div>+    // fprintf( stderr, "Writing file: %s\n",  gcdaFileName);</div><div>+</div><div>+    // Lets clear counters sumators</div><div>+    countersSum <span class="Apple-tab-span" style="white-space:pre">              </span>= 0;</div><div>+    countersMax <span class="Apple-tab-span" style="white-space:pre">              </span>= 0;</div><div>+    countersFoundSum <span class="Apple-tab-span" style="white-space:pre"> </span>= 0;</div><div>+</div><div>+    // Open the data file.</div><div>+    gcdaFile = fopen( gcdaFileName, "w" );</div><div>+    if ( !gcdaFile ) {</div><div>+      fprintf( stderr, "Unable to create %s\n", gcdaFileName );</div><div>+      return false;</div><div>+    }</div><div>+</div><div>+    //Form preamble</div><div>+    preamble.magic<span class="Apple-tab-span" style="white-space:pre">    </span>= GCDA_MAGIC;</div><div>+    preamble.version<span class="Apple-tab-span" style="white-space:pre"> </span>= gcnoPreamble.version;</div><div>+    preamble.timestamp<span class="Apple-tab-span" style="white-space:pre">     </span>= gcnoPreamble.timestamp;</div><div>+</div><div>+    //Write preamble</div><div>+    status = fwrite (&preamble , sizeof( preamble ), 1 , gcdaFile );</div><div>+    if ( status != 1 )</div><div>+      fprintf( stderr, "Error while writing gcda preamble to a file %s\n", gcdaFileName );</div><div>+</div><div>+    //Write function info and counter counts</div><div>+    for (</div><div>+        currentFunction = functions.begin();</div><div>+        currentFunction != functions.end();</div><div>+        currentFunction++</div><div>+        )</div><div>+    {</div><div>+      //Write function announcement frame header (length always equals 2)</div><div>+      header.tag = GCOV_TAG_FUNCTION;</div><div>+      header.length = 2;</div><div>+      status = fwrite (&header, sizeof(header), 1, gcdaFile );</div><div>+      if ( status != 1 )</div><div>+        fprintf( stderr, "Error while writing function announcement to a file %s\n", gcdaFileName );</div><div>+</div><div>+      //Write function id</div><div>+      buffer = (*currentFunction)->getId();</div><div>+      status = fwrite (&buffer, sizeof( buffer ), 1, gcdaFile );</div><div>+      if ( status != 1 )</div><div>+        fprintf( stderr, "Error while writing function id to a file %s\n", gcdaFileName );</div><div>+</div><div>+      //Write function checksum</div><div>+      buffer = (*currentFunction)->getChecksum();</div><div>+      status = fwrite (&buffer, sizeof( buffer ), 1, gcdaFile );</div><div>+      if ( status != 1 )</div><div>+        fprintf( stderr, "Error while writing function checksum to a file %s\n", gcdaFileName );</div><div>+</div><div>+      // Determine how many counters there are</div><div>+      // and store their counts in buffer</div><div>+      countersFound = 0;</div><div>+      (*currentFunction)->getCounters( llBuffer, countersFound, countersSum, countersMax );</div><div>+      countersFoundSum += countersFound;</div><div>+</div><div>+      //Write info about counters</div><div>+      header.tag = GCOV_TAG_COUNTER;</div><div>+      header.length = countersFound * 2;</div><div>+      status = fwrite (&header, sizeof( header ), 1, gcdaFile );</div><div>+      if ( status != 1 )</div><div>+        fprintf( stderr, "Error while writing counter header to a file %s\n", gcdaFileName );</div><div>+</div><div>+      status = fwrite (llBuffer, sizeof( uint64_t ), countersFound , gcdaFile );</div><div>+      if ( status != countersFound )</div><div>+        fprintf( stderr, "Error while writing counter data to a file %s\n", gcdaFileName );</div><div>+    }</div><div>+</div><div>+    // Prepare frame with object file statistics</div><div>+    header.tag = GCOV_TAG_OBJECT_SUMMARY;</div><div>+    header.length = 9;</div><div>+    objectStats.checksum = 0;<span class="Apple-tab-span" style="white-space:pre">                     </span>// TODO: have no idea hov to calculates it :)</div><div>+    objectStats.counters = countersFoundSum;</div><div>+    objectStats.runs = 1;<span class="Apple-tab-span" style="white-space:pre">                              </span>// We are lying for now, we have no means of figuring this out</div><div>+    objectStats.sum = countersSum;<span class="Apple-tab-span" style="white-space:pre">          </span>// Sum of all counters</div><div>+    objectStats.max = countersMax;<span class="Apple-tab-span" style="white-space:pre">          </span>// max value for counter on last run, we have no clue</div><div>+    objectStats.sumMax = countersMax;<span class="Apple-tab-span" style="white-space:pre">                </span>// we have no clue</div><div>+</div><div>+    // Write data</div><div>+    status = fwrite (&header, sizeof( header ), 1, gcdaFile );</div><div>+    if ( status != 1 )</div><div>+      fprintf( stderr, "Error while writing stats header to a file %s\n", gcdaFileName );</div><div>+    status = fwrite (&objectStats, sizeof( objectStats ), 1, gcdaFile );</div><div>+    if ( status != 1 )</div><div>+      fprintf( stderr, "Error while writing object stats to a file %s\n", gcdaFileName );</div><div>+</div><div>+</div><div>+    // Prepare frame with program statistics</div><div>+    header.tag = GCOV_TAG_PROGRAM_SUMMARY;</div><div>+    header.length = 9;</div><div>+    programStats.checksum = 0;<span class="Apple-tab-span" style="white-space:pre">                       </span>// TODO: have no idea hov to calculate it :)</div><div>+    programStats.counters = countersFoundSum;</div><div>+    programStats.runs = 1;<span class="Apple-tab-span" style="white-space:pre">                     </span>// We are lying for now, we have no clue</div><div>+    programStats.sum = countersSum;<span class="Apple-tab-span" style="white-space:pre">               </span>// Sum of all counters</div><div>+    programStats.max = countersMax;<span class="Apple-tab-span" style="white-space:pre">         </span>// max value for counter on last run, we have no clue</div><div>+    programStats.sumMax = countersMax;<span class="Apple-tab-span" style="white-space:pre">               </span>// we have no clue</div><div>+</div><div>+    // Write data</div><div>+    status = fwrite (&header, sizeof( header ), 1, gcdaFile );</div><div>+    if ( status != 1 )</div><div>+      fprintf( stderr, "Error while writing stats header to a file %s\n", gcdaFileName );</div><div>+    status = fwrite (&programStats, sizeof( programStats ), 1, gcdaFile );</div><div>+    if ( status != 1 )</div><div>+      fprintf( stderr, "Error while writing program stats to a file %s\n", gcdaFileName );</div><div>+</div><div>+    fclose( gcdaFile );</div><div>+</div><div>+    return true;</div><div>   }</div><div> </div><div>   bool GcovData::readFrame(</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>       FILE*         gcovFile</div><div>-   )</div><div>+      FILE*         gcovFile</div><div>+      )</div><div>   {</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>    gcov_frame_header <span class="Apple-tab-span" style="white-space:pre">    </span>header;</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    char <span class="Apple-tab-span" style="white-space:pre">         </span>buffer[512];</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>    uint32_t            intBuffer[4096];</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>    uint32_t            tempBlockId;</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>    blocks_iterator_t<span class="Apple-tab-span" style="white-space:pre">     </span>tempBlockIterator;</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>    int                 status;</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>    GcovFunctionData*<span class="Apple-tab-span" style="white-space:pre">     </span>newFunction;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>    status = readFrameHeader( &header, gcovFile);</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    if ( status <= 0 ){</div><div>-                // Not printing error message because this </div><div>-<span class="Apple-tab-span" style="white-space:pre">            </span>// happenns at the end of each file</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>    <span class="Apple-tab-span" style="white-space:pre">      </span>return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>    }</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    switch (header.tag){</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                  </span>case GCOV_TAG_FUNCTION:</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                             </span>numberOfFunctions++;</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                </span>newFunction = new GcovFunctionData;</div><div>-<span class="Apple-tab-span" style="white-space:pre">                         </span>if ( !readFunctionFrame(header, gcovFile, newFunction) ){</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                   </span>fprintf( stderr, "Error while reading FUNCTION from gcov file...\n" );</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                    </span>return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>}</div><div>-<span class="Apple-tab-span" style="white-space:pre">                           </span>functions.push_back(newFunction);</div><div>-<span class="Apple-tab-span" style="white-space:pre">                           </span>break;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                      </span>case GCOV_TAG_BLOCKS:</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>status = fread( &intBuffer, 4, header.length, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>if ( status != (int) header.length){</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                        </span>fprintf( </div><div>-<span class="Apple-tab-span" style="white-space:pre">                                          </span>stderr, "Error while reading BLOCKS from gcov file...\n"</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                          </span>"Header lenght is %u instead of %u\n", </div><div>-<span class="Apple-tab-span" style="white-space:pre">                                          </span>header.length, </div><div>-<span class="Apple-tab-span" style="white-space:pre">                                            </span>status </div><div>-<span class="Apple-tab-span" style="white-space:pre">                                    </span>);</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                  </span>return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>}</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                           </span>for( uint32_t i = 0; i < header.length; i++ )</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                    </span>functions.back()->addBlock(i, intBuffer[i], "");</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>break;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                      </span>case GCOV_TAG_ARCS:</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                         </span>status = fread( &intBuffer, 4, header.length, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>if (status != (int) header.length){</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                 </span>return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>}</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                           </span>for ( int i = 1; i < (int) header.length; i += 2 )</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                       </span>functions.back()->addArc(intBuffer[0], intBuffer[i], intBuffer[i+1]);</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                            </span>break;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                      </span>case GCOV_TAG_LINES:</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                </span>status = fread( &intBuffer, 4, 2, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">                           </span>if (status != 2 || intBuffer[1] != 0){</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                      </span>fprintf(</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                            </span>stderr,</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                             </span>"Error while reading block id for LINES from gcov file..."</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                        </span>);</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                  </span>return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>}</div><div>-<span class="Apple-tab-span" style="white-space:pre">                           </span>tempBlockId = intBuffer[0];</div><div>-<span class="Apple-tab-span" style="white-space:pre">                         </span>header.length -= 2;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                         </span>// Find the right block</div><div>-<span class="Apple-tab-span" style="white-space:pre">                             </span>tempBlockIterator =functions.back()->findBlockById(tempBlockId);</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                         </span>header.length -= readString(buffer, gcovFile);</div><div>-<span class="Apple-tab-span" style="white-space:pre">                              </span>functions.back()->setBlockFileName( tempBlockIterator, buffer );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                         </span>status = fread( &intBuffer, 4, header.length, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>if (status != (int) header.length){</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                 </span>fprintf( stderr, "Error while reading LINES from gcov file..." );</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                 </span>return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>}</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                           </span>else</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                        </span>for (int i = 0; i < (int) (header.length - 2); i++)</div><div>-<span class="Apple-tab-span" style="white-space:pre">                                              </span>functions.back()->addBlockLine( tempBlockIterator, intBuffer[i] );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                               </span>break;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                      </span>default:</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">                            </span>fprintf( stderr, "\n\nERROR - encountered unknown *.gcno tag : 0x%x\n", header.tag );</div><div>-<span class="Apple-tab-span" style="white-space:pre">                             </span>break;</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>    }</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    return true;</div><div>+    gcov_frame_header <span class="Apple-tab-span" style="white-space:pre">  </span>header;</div><div>+    char <span class="Apple-tab-span" style="white-space:pre">          </span>buffer[512];</div><div>+    uint32_t            intBuffer[4096];</div><div>+    uint32_t            tempBlockId;</div><div>+    blocks_iterator_t<span class="Apple-tab-span" style="white-space:pre">     </span>tempBlockIterator;</div><div>+    int                 status;</div><div>+    GcovFunctionData*<span class="Apple-tab-span" style="white-space:pre">  </span>newFunction;</div><div>+</div><div>+    status = readFrameHeader( &header, gcovFile);</div><div>+</div><div>+    if ( status <= 0 ){</div><div>+      // Not printing error message because this </div><div>+      // happenns at the end of each file</div><div>+      return false;</div><div>+    }</div><div>+</div><div>+    switch (header.tag){</div><div>+      case GCOV_TAG_FUNCTION:</div><div>+        fprintf( stderr, "gcno header tag: GCOV_TAG_FUNCTION\n");</div><div>+        numberOfFunctions++;</div><div>+        newFunction = new GcovFunctionData;</div><div>+        if ( !readFunctionFrame(header, gcovFile, newFunction) ){</div><div>+          fprintf( stderr, "Error while reading FUNCTION from gcov file...\n" );</div><div>+          return false;</div><div>+        }</div><div>+        functions.push_back(newFunction);</div><div>+        break;</div><div>+</div><div>+      case GCOV_TAG_BLOCKS:</div><div>+        fprintf( stderr, "gcno header tag: GCOV_TAG_BLOCKS\n");</div><div>+        status = fread( &intBuffer, 4, header.length, gcovFile );</div><div>+        if ( status != (int) header.length){</div><div>+          fprintf( </div><div>+              stderr, "Error while reading BLOCKS from gcov file...\n"</div><div>+              "Header lenght is %u instead of %u\n", </div><div>+              header.length, </div><div>+              status </div><div>+              );</div><div>+          return false;</div><div>+        }</div><div>+</div><div>+        for( uint32_t i = 0; i < header.length; i++ )</div><div>+          functions.back()->addBlock(i, intBuffer[i], "");</div><div>+        break;</div><div>+</div><div>+      case GCOV_TAG_ARCS:</div><div>+        fprintf( stderr, "gcno header tag: GCOV_TAG_ARCS\n");</div><div>+        status = fread( &intBuffer, 4, header.length, gcovFile );</div><div>+        if (status != (int) header.length){</div><div>+          return false;</div><div>+        }</div><div>+</div><div>+        for ( int i = 1; i < (int) header.length; i += 2 )</div><div>+          functions.back()->addArc(intBuffer[0], intBuffer[i], intBuffer[i+1]);</div><div>+        break;</div><div>+</div><div>+      case GCOV_TAG_LINES:</div><div>+        fprintf( stderr, "gcno header tag: GCOV_TAG_LINES\n");<span class="Apple-tab-span" style="white-space:pre">                 </span></div><div>+        status = fread( &intBuffer, 4, 2, gcovFile );</div><div>+        if (status != 2 || intBuffer[1] != 0){</div><div>+          fprintf(</div><div>+              stderr,</div><div>+              "Error while reading block id for LINES from gcov file..."</div><div>+              );</div><div>+          return false;</div><div>+        }</div><div>+        tempBlockId = intBuffer[0];</div><div>+        header.length -= 2;</div><div>+</div><div>+        // Find the right block</div><div>+        tempBlockIterator =functions.back()->findBlockById(tempBlockId);</div><div>+</div><div>+        header.length -= readString(buffer, gcovFile);</div><div>+        functions.back()->setBlockFileName( tempBlockIterator, buffer );</div><div>+</div><div>+        status = fread( &intBuffer, 4, header.length, gcovFile );</div><div>+        fprintf ( stdout, "status: %d - header.length: %u - (int) header.length %d \n", status, header.length, (int) header.length);</div><div>+        if (status != (int) header.length){</div><div>+          fprintf( stderr, "Error while reading LINES from gcov file..." );</div><div>+          return false;</div><div>+        }</div><div>+</div><div>+        else</div><div>+          for (int i = 0; i < (int) (header.length - 2); i++)</div><div>+            functions.back()->addBlockLine( tempBlockIterator, intBuffer[i] );</div><div>+</div><div>+        break;</div><div>+</div><div>+      default:</div><div>+        fprintf( stderr, "\n\nERROR - encountered unknown *.gcno tag : 0x%x\n", header.tag );</div><div>+        break;</div><div>+    }</div><div>+</div><div>+    return true;</div><div>   }</div><div> </div><div>   int GcovData::readString(</div><div>-<span class="Apple-tab-span" style="white-space:pre">           </span>   char*<span class="Apple-tab-span" style="white-space:pre">           </span> buffer,   //TODO: use global buffer here</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>       FILE*         gcovFile</div><div>-  )</div><div>+      char*<span class="Apple-tab-span" style="white-space:pre">              </span> buffer,   //TODO: use global buffer here</div><div>+      FILE*         gcovFile</div><div>+      )</div><div>   {</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>    int<span class="Apple-tab-span" style="white-space:pre">                                   </span>status;</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    int<span class="Apple-tab-span" style="white-space:pre">                                   </span>length;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    status = fread( &length, sizeof(int), 1, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>    if (status != 1){</div><div>-              fprintf( stderr, "ERROR: Unable to read string length from gcov file\n" );</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>      return -1;</div><div>-            }</div><div>+    int<span class="Apple-tab-span" style="white-space:pre">                                     </span>status;</div><div>+    uint32_t<span class="Apple-tab-span" style="white-space:pre">               </span>length;</div><div>+</div><div>+    status = fread( &length, sizeof(uint32_t), 1, gcovFile );</div><div>+    fprintf( stdout, "size of read bytes: %u\n", length);</div><div>+    if (status != 1){</div><div>+      fprintf( stderr, "ERROR: Unable to read string length from gcov file\n" );</div><div>+      return -1;</div><div>+    }</div><div> </div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>    status = fread( buffer, length * 4 , 1, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>    if (status != 1){</div><div>-              fprintf( stderr, "ERROR: Unable to read string from gcov file\n" );</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>      return -1;</div><div>-            }</div><div>+    status = fread( buffer, length * 4 , 1, gcovFile );</div><div>+    if (status != 1){</div><div>+      fprintf( stderr, "ERROR: Unable to read string from gcov file\n" );</div><div>+      return -1;</div><div>+    }</div><div> </div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    buffer[length * 4] = '\0';</div><div>+    buffer[length * 4] = '\0';</div><div> </div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>    return length +1;</div><div>+    return length +1;</div><div>   }</div><div> </div><div>   int GcovData::readFrameHeader(</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>       gcov_frame_header* <span class="Apple-tab-span" style="white-space:pre">       </span>header,</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>       FILE*         <span class="Apple-tab-span" style="white-space:pre">                </span>gcovFile</div><div>-   )</div><div>+      gcov_frame_header* <span class="Apple-tab-span" style="white-space:pre">   </span>header,</div><div>+      FILE*         <span class="Apple-tab-span" style="white-space:pre">          </span>gcovFile</div><div>+      )</div><div>   {</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    int<span class="Apple-tab-span" style="white-space:pre">                                   </span>status;</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    int<span class="Apple-tab-span" style="white-space:pre">                                   </span>length;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    length = sizeof(gcov_frame_header);</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>    status = fread( header, length, 1, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>    if (status != 1){</div><div>-<span class="Apple-tab-span" style="white-space:pre">             </span>//fprintf( stderr, "ERROR: Unable to read frame header from gcov file\n" );</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>    <span class="Apple-tab-span" style="white-space:pre">      </span>return -1;</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>    }</div><div>+    int<span class="Apple-tab-span" style="white-space:pre">                                    </span>status;</div><div>+    int     <span class="Apple-tab-span" style="white-space:pre">             </span>length;</div><div>+</div><div>+    length = sizeof(gcov_frame_header);</div><div>+    status = fread( header, length, 1, gcovFile );</div><div>+    if (status != 1){</div><div>+      fprintf( stderr, "ERROR: Unable to read frame header from gcov file\n" );</div><div>+      return -1;</div><div>+    }</div><div> </div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>    return length / 4;</div><div>+    fprintf( stdout, "Succesfully read frame header with \n \</div><div>+        TAG: %u\n \</div><div>+        LENGTH: %u \n", header->tag, header->length); </div><div>+      return length / 4; // Why x/4 ?</div><div>   }</div><div> </div><div>   int GcovData::readFilePreamble(</div><div>-  <span class="Apple-tab-span" style="white-space:pre">       </span>   gcov_preamble* <span class="Apple-tab-span" style="white-space:pre"> </span>    preamble,</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>   FILE*         <span class="Apple-tab-span" style="white-space:pre">              </span>gcovFile,</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>   uint32_t<span class="Apple-tab-span" style="white-space:pre">                                </span>desiredMagic</div><div>-  )</div><div>+      gcov_preamble* <span class="Apple-tab-span" style="white-space:pre">    </span>    preamble,</div><div>+      FILE*         <span class="Apple-tab-span" style="white-space:pre">          </span>gcovFile,</div><div>+      uint32_t<span class="Apple-tab-span" style="white-space:pre">                          </span>desiredMagic</div><div>+      )</div><div>   {</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>    int<span class="Apple-tab-span" style="white-space:pre">                                   </span>status;</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    int<span class="Apple-tab-span" style="white-space:pre">                                   </span>length;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    length = sizeof( gcov_preamble );</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    status = fread( preamble, sizeof( gcov_preamble), 1, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>    if (status <= 0) {</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>      fprintf( stderr, "Error while reading file preamble\n" );</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>      return -1;</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>    }</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    if ( preamble->magic != GCNO_MAGIC ) {</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>      fprintf( stderr, "File is not a valid *.gcno output (magic: 0x%4x)\n", preamble->magic );</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>      return -1;</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>    }</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>    return length / 4;</div><div>+    int<span class="Apple-tab-span" style="white-space:pre">                                   </span>status;</div><div>+    int<span class="Apple-tab-span" style="white-space:pre">                                    </span>length;</div><div>+</div><div>+    length = sizeof( gcov_preamble );</div><div>+    status = fread( preamble, sizeof( gcov_preamble), 1, gcovFile );</div><div>+    if (status <= 0) {</div><div>+      fprintf( stderr, "Error while reading file preamble\n" );</div><div>+      return -1;</div><div>+    }</div><div>+</div><div>+    if ( preamble->magic != GCNO_MAGIC ) {</div><div>+      fprintf( stderr, "File is not a valid *.gcno output (magic: 0x%4x)\n", preamble->magic );</div><div>+      return -1;</div><div>+    }</div><div>+</div><div>+    return length / 4;</div><div>   }</div><div> </div><div>   bool GcovData::readFunctionFrame(</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>   gcov_frame_header <span class="Apple-tab-span" style="white-space:pre">      </span>header,</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>   FILE*         <span class="Apple-tab-span" style="white-space:pre">      </span>gcovFile,</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>   GcovFunctionData*<span class="Apple-tab-span" style="white-space:pre">       </span>function</div><div>-  )</div><div>+      gcov_frame_header <span class="Apple-tab-span" style="white-space:pre">     </span>header,</div><div>+      FILE*         <span class="Apple-tab-span" style="white-space:pre">  </span>gcovFile,</div><div>+      GcovFunctionData*<span class="Apple-tab-span" style="white-space:pre"> </span>function</div><div>+      )</div><div>   {</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  char <span class="Apple-tab-span" style="white-space:pre">            </span>    buffer[512];<span class="Apple-tab-span" style="white-space:pre">          </span>//TODO: use common buffers</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  uint32_t          intBuffer[4096];</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  int               status;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  status = fread( &intBuffer, 8, 1, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  if (status != 1){</div><div>-<span class="Apple-tab-span" style="white-space:pre">                </span>fprintf( stderr, "ERROR: Unable to read Function ID & checksum\n" );</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  <span class="Apple-tab-span" style="white-space:pre"> </span>return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  }</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  header.length -= 2;</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  function->setId( intBuffer[0] );</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  function->setChecksum( intBuffer[1] );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  header.length -= readString( buffer, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  function->setFunctionName( buffer );</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  header.length -= readString( buffer, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  function->setFileName( buffer );</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  status = fread( &intBuffer, 4, header.length, gcovFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  if (status <= 0){</div><div>-<span class="Apple-tab-span" style="white-space:pre">             </span>fprintf( stderr, "ERROR: Unable to read Function starting line number\n" );</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  <span class="Apple-tab-span" style="white-space:pre"> </span>return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>  }</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>  function->setFirstLineNumber( intBuffer[0] );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  return true;</div><div>+    char <span class="Apple-tab-span" style="white-space:pre">          </span>    buffer[512];<span class="Apple-tab-span" style="white-space:pre">          </span>//TODO: use common buffers</div><div>+    uint32_t          intBuffer[4096];</div><div>+    int               status;</div><div>+</div><div>+    status = fread( &intBuffer, 12, 1, gcovFile );</div><div>+    if (status != 1){</div><div>+      fprintf( stderr, "ERROR: Unable to read Function ID & checksum\n" );</div><div>+      return false;</div><div>+    }</div><div>+    header.length -= 2;</div><div>+    function->setId( intBuffer[0] );</div><div>+    function->setChecksum( intBuffer[1] );</div><div>+</div><div>+    header.length -= readString( buffer, gcovFile );</div><div>+    function->setFunctionName( buffer );</div><div>+    fprintf( stdout, "FunctionName: %s - in readFunctionName\n", buffer );</div><div>+    header.length -= readString( buffer, gcovFile );</div><div>+    function->setFileName( buffer );</div><div>+    fprintf( stdout, "Filename: %s - in readFunctionName\n", buffer );</div><div>+    //status = fread( &intBuffer, 4, header.length, gcovFile );</div><div>+    status = fread( &intBuffer, 4, 1, gcovFile );</div><div>+    if (status <= 0){</div><div>+      fprintf( stderr, "ERROR: Unable to read Function starting line number\n" );</div><div>+      return false;</div><div>+    }</div><div>+    function->setFirstLineNumber( intBuffer[0] );</div><div>+</div><div>+    return true;</div><div>   }</div><div> </div><div>   bool GcovData::writeReportFile()</div><div>   {</div><div>-<span class="Apple-tab-span" style="white-space:pre">     </span>  functions_iterator_t <span class="Apple-tab-span" style="white-space:pre">            </span>currentFunction;</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>  uint32_t<span class="Apple-tab-span" style="white-space:pre">                 </span>i = 1;<span class="Apple-tab-span" style="white-space:pre">                                      </span>//iterator</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  FILE*<span class="Apple-tab-span" style="white-space:pre">                            </span>textFile;</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>  // Debug message</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>  // fprintf( stderr, "Writing file: %s\n",  textFileName);</div><div>-</div><div>-        // Open the data file.</div><div>-        textFile = fopen( textFileName, "w" );</div><div>-<span class="Apple-tab-span" style="white-space:pre">       </span>if ( !textFile ) {</div><div>-<span class="Apple-tab-span" style="white-space:pre">  </span>  fprintf( stderr, "Unable to create %s\n", textFileName );</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>  return false;</div><div>-<span class="Apple-tab-span" style="white-space:pre">    </span>}</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>printGcnoFileInfo( textFile );</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">      </span>for (</div><div>-<span class="Apple-tab-span" style="white-space:pre">                       </span>currentFunction = functions.begin();</div><div>-<span class="Apple-tab-span" style="white-space:pre">                        </span>currentFunction != functions.end();</div><div>-<span class="Apple-tab-span" style="white-space:pre">                 </span>currentFunction++</div><div>-<span class="Apple-tab-span" style="white-space:pre">           </span>)</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>{</div><div>-<span class="Apple-tab-span" style="white-space:pre">           </span>(*currentFunction)->printFunctionInfo( textFile, i );</div><div>-                (*currentFunction)->printCoverageInfo( textFile, i );</div><div>-<span class="Apple-tab-span" style="white-space:pre">            </span>i++;</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div>-</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>fclose ( textFile );</div><div>-<span class="Apple-tab-span" style="white-space:pre">        </span>return true;</div><div>+    functions_iterator_t <span class="Apple-tab-span" style="white-space:pre">             </span>currentFunction;</div><div>+    uint32_t<span class="Apple-tab-span" style="white-space:pre">                      </span>i = 1;<span class="Apple-tab-span" style="white-space:pre">                                      </span>//iterator</div><div>+    FILE*<span class="Apple-tab-span" style="white-space:pre">                               </span>textFile;</div><div>+</div><div>+    // Debug message</div><div>+    // fprintf( stderr, "Writing file: %s\n",  textFileName);</div><div>+</div><div>+    // Open the data file.</div><div>+    textFile = fopen( textFileName, "w" );</div><div>+    if ( !textFile ) {</div><div>+      fprintf( stderr, "Unable to create %s\n", textFileName );</div><div>+      return false;</div><div>+    }</div><div>+</div><div>+    printGcnoFileInfo( textFile );</div><div>+</div><div>+    for (</div><div>+        currentFunction = functions.begin();</div><div>+        currentFunction != functions.end();</div><div>+        currentFunction++</div><div>+        )</div><div>+    {</div><div>+      (*currentFunction)->printFunctionInfo( textFile, i );</div><div>+      (*currentFunction)->printCoverageInfo( textFile, i );</div><div>+      i++;</div><div>+    }</div><div>+</div><div>+    fclose ( textFile );</div><div>+    return true;</div><div>   }</div><div> </div><div>   void GcovData::printGcnoFileInfo( FILE * textFile )</div><div>   {</div><div>-      fprintf(</div><div>+    fprintf(</div><div>         textFile,</div><div>         "\nFILE:\t\t\t%s\n"</div><div>         "magic:\t\t\t%x\n"</div><div>@@ -473,19 +484,31 @@ namespace Gcov {</div><div>         gcnoPreamble.version,</div><div>         gcnoPreamble.timestamp,</div><div>         numberOfFunctions</div><div>-      );</div><div>+        );</div><div>   }</div><div> </div><div>   void GcovData::writeGcovFile( )</div><div>   {</div><div>     char        path[512];</div><div>     char        command[512];</div><div>-</div><div>-    //fprintf (stderr, "Attempting to run gcov for: %s\n", cFileName );</div><div>+    char        source_file_name[512];</div><div>+    fprintf (stderr, "Attempting to run gcov for: %s\n", cFileName );</div><div>     strcpy( path, cFileName );</div><div>     dirname( path );</div><div>-    sprintf( command, "( cd %s && gcov %s &>> gcov.log)", path, basename( cFileName ) );</div><div>-    //fprintf (stderr, "> %s\n", command );</div><div>+    char* target_file_name = basename( cFileName );</div><div>+    </div><div>+    //if ( strstr( path, "rtems") )</div><div>+    //{</div><div>+    //  strncpy(source_file_name, target_file_name + 11, strlen(target_file_name) - 11);</div><div>+    //  sprintf( command, "cp /home/hf/development/rtems/src/rtems/cpukit/%s/src/%s /home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/src/%s", "rtems", source_file_name, target_file_name);</div><div>+    //}</div><div>+    </div><div>+    fprintf (stderr, "> %s\n", command );</div><div>+    system( command );</div><div>+    memset(&command, 0, sizeof(command));</div><div>+</div><div>+    sprintf( command, "( cd %s && gcov %s &>> gcov.log)", path, target_file_name);</div><div>+    fprintf (stderr, "> %s\n", command );</div><div>     system( command );</div><div>   }</div><div> </div><div>@@ -494,10 +517,10 @@ namespace Gcov {</div><div>     functions_iterator_t <span class="Apple-tab-span" style="white-space:pre">    </span>currentFunction;</div><div>     bool<span class="Apple-tab-span" style="white-space:pre">                 </span>status = true;</div><div>     for (</div><div>-      currentFunction = functions.begin();</div><div>-      currentFunction != functions.end();</div><div>-      currentFunction++</div><div>-    )</div><div>+        currentFunction = functions.begin();</div><div>+        currentFunction != functions.end();</div><div>+        currentFunction++</div><div>+        )</div><div>     {</div><div>       if ( !(*currentFunction)->processFunctionCounters(  ) )</div><div>         status = false;</div><div>diff --git a/tester/covoar/GcovFunctionData.cc b/tester/covoar/GcovFunctionData.cc</div><div>index f746b12..e432d1e 100644</div><div>--- a/tester/covoar/GcovFunctionData.cc</div><div>+++ b/tester/covoar/GcovFunctionData.cc</div><div>@@ -67,7 +67,7 @@ namespace Gcov {</div><div>     if ( symbolInfo != NULL )</div><div>       coverageMap = symbolInfo->unifiedCoverageMap;</div><div> </div><div>-#if 0</div><div>+#if 1</div><div>     if ( coverageMap == NULL) {</div><div>       fprintf(</div><div>         stderr,</div><div>diff --git a/tester/covoar/app_common.h b/tester/covoar/app_common.h</div><div>index d28bfd0..b8f8605 100644</div><div>--- a/tester/covoar/app_common.h</div><div>+++ b/tester/covoar/app_common.h</div><div>@@ -17,7 +17,7 @@ extern Target::TargetBase*          TargetInfo;</div><div> extern const char*                  dynamicLibrary;</div><div> extern const char*                  projectName;</div><div> </div><div>-#define MAX_LINE_LENGTH             512</div><div>+#define MAX_LINE_LENGTH             2048</div><div> extern char                         inputBuffer[MAX_LINE_LENGTH];</div><div> extern char                         inputBuffer2[MAX_LINE_LENGTH];</div><div> </div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index 32195cf..e250661 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -261,7 +261,7 @@ class covoar(object):</div><div>             log.stderr("Skipping " + setName)</div><div>             return</div><div> </div><div>-        command = "covoar -C" + covoarConfigFile + " -S " + symbolFile + " -O " + covoarResultDir + " " + path.join(self.tracesDir, "*.exe")</div><div>+        command = "covoar -v -C" + covoarConfigFile + " -S " + symbolFile + " -O " + covoarResultDir + " " + path.join(self.tracesDir, "*.exe")</div><div>         log.notice("Running covoar for " + setName, stdout_only=True)</div><div>         log.notice(command, stdout_only=True)</div><div>         executor = execute.execute(verbose=True, output=output_handler)</div><div>diff --git a/tester/rt/options.py b/tester/rt/options.py</div><div>index ff4ea60..8d5ad01 100644</div><div>--- a/tester/rt/options.py</div><div>+++ b/tester/rt/options.py</div><div>@@ -98,6 +98,8 @@ def load(args, optargs = None,</div><div>     # The command line contains the base defaults object all build objects copy</div><div>     # and modify by loading a configuration.</div><div>     #</div><div>+    log.stderr('rtdir: ')</div><div>+    print 'rtdir: ' + rtdir + '\n'</div><div>     opts = command_line(args,</div><div>                         optargs,</div><div>                         macros.macros(name = defaults, rtdir = rtdir),</div><div>diff --git a/tester/rt/test.py b/tester/rt/test.py</div><div>index cbe7332..57af018 100644</div><div>--- a/tester/rt/test.py</div><div>+++ b/tester/rt/test.py</div><div>@@ -222,6 +222,8 @@ def run(command_path = None):</div><div>         job_trace = 'jobs' in debug_trace.split(',')</div><div>         rtems_tools = opts.find_arg('--rtems-tools')</div><div>         if rtems_tools:</div><div>+            bla = '%{_prefix}'</div><div>+            print "prefixx: " + bla</div><div>             if len(rtems_tools) != 2:</div><div>                 raise error.general('invalid RTEMS tools option')</div><div>             rtems_tools = rtems_tools[1]</div><div>@@ -326,6 +328,8 @@ def run(command_path = None):</div><div>         if coverage_enabled:</div><div>             coverage.config_map = opts.defaults.macros['coverage']</div><div>             coverage.executables = executables</div><div>+            print [c for c in coverage.config_map]</div><div>+            print [e for e in executables]</div><div>             coverage.run()</div><div> </div><div>     except error.general, gerr:</div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a> b/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>index 52ed275..2627aeb 100644</div><div>--- a/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>+++ b/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>@@ -61,6 +61,6 @@ format:<span class="Apple-tab-span" style="white-space:pre">           </span>                none,    none,     'QEMU'</div><div> target:<span class="Apple-tab-span" style="white-space:pre">               </span>                none,    none,     'i386-rtems4.11'</div><div> explanations:<span class="Apple-tab-span" style="white-space:pre">       </span>            none,    none,     '%{_rtscripts}/coverage/Explanations.txt'</div><div> coverageExtension:<span class="Apple-tab-span" style="white-space:pre">       </span>      none,    none,     'exe.cov'</div><div>-gcnosFile:<span class="Apple-tab-span" style="white-space:pre"> </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div>+gcnosFile:<span class="Apple-tab-span" style="white-space:pre">  </span>              none,    none,     '/home/hf/tmp/rtems.gcnos'</div><div> executableExtension:<span class="Apple-tab-span" style="white-space:pre"> </span>    none,    none,     'exe'</div><div> projectName:<span class="Apple-tab-span" style="white-space:pre">     </span>            none,    none,     'RTEMS 4.11'</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index 4b90fc7..0490287 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -1,5 +1,3 @@</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">    </span>name=core</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>-<span class="Apple-tab-span" style="white-space:pre"> </span>lib=sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 0b68934579425a7b99cb372b0155bb25cb863a55 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Mon, 21 Sep 2015 13:37:32 +0200</div><div>Subject: [PATCH 16/18] remove absolute paths from gcnos file</div><div><br></div><div>---</div><div> tester/covoar/GcovData.cc                   |  6 +++---</div><div> tester/rt/coverage.py                       | 22 +++++++++++++++++++---</div><div> tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a> |  2 +-</div><div> tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a> |  2 +-</div><div> tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a>          |  2 +-</div><div> 5 files changed, 25 insertions(+), 9 deletions(-)</div><div><br></div><div>diff --git a/tester/covoar/GcovData.cc b/tester/covoar/GcovData.cc</div><div>index edaa1bf..8dda3e2 100644</div><div>--- a/tester/covoar/GcovData.cc</div><div>+++ b/tester/covoar/GcovData.cc</div><div>@@ -503,9 +503,9 @@ namespace Gcov {</div><div>     //  sprintf( command, "cp /home/hf/development/rtems/src/rtems/cpukit/%s/src/%s /home/hf/development/rtems/b-pc386/i386-rtems4.11/c/pc386/cpukit/rtems/src/%s", "rtems", source_file_name, target_file_name);</div><div>     //}</div><div>     </div><div>-    fprintf (stderr, "> %s\n", command );</div><div>-    system( command );</div><div>-    memset(&command, 0, sizeof(command));</div><div>+    //fprintf (stderr, "> %s\n", command );</div><div>+    //system( command );</div><div>+    //memset(&command, 0, sizeof(command));</div><div> </div><div>     sprintf( command, "( cd %s && gcov %s &>> gcov.log)", path, target_file_name);</div><div>     fprintf (stderr, "> %s\n", command );</div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index e250661..b2242f7 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -239,6 +239,14 @@ class symbolSet(object):</div><div>             f.write("\t lib=" + lib + '\n')</div><div>         f.close()</div><div> </div><div>+class gcnos(object):</div><div>+    def create_gcnos_file(self, gcnos_config_file_path, gcnos_file_path, path_to_build_dir):</div><div>+        with open(gcnos_file_path, 'w') as gcnos_file:</div><div>+            with open(gcnos_config_file_path, 'r') as config_file:</div><div>+                for line in config_file:</div><div>+                    if line.strip():</div><div>+                        gcnos_file.write(path.join(path_to_build_dir, line))</div><div>+</div><div> class covoar(object):</div><div>     '''</div><div>     Covoar runner</div><div>@@ -250,7 +258,7 @@ class covoar(object):</div><div>         self.tracesDir = tracesDir</div><div>         self.covoarSrcDir = covoarSrcDir</div><div> </div><div>-    def run(self, setName, covoarConfigFile, symbolFile):</div><div>+    def run(self, setName, covoarConfigFile, symbolFile, gcnos_file):</div><div>         covoarResultDir = path.join(self.baseResultDir, setName)</div><div> </div><div>         if (not path.exists(covoarResultDir)):</div><div>@@ -262,6 +270,8 @@ class covoar(object):</div><div>             return</div><div> </div><div>         command = "covoar -v -C" + covoarConfigFile + " -S " + symbolFile + " -O " + covoarResultDir + " " + path.join(self.tracesDir, "*.exe")</div><div>+        if (path.exists(gcnos_file)):</div><div>+            command = command + " -g " + gcnos_file</div><div>         log.notice("Running covoar for " + setName, stdout_only=True)</div><div>         log.notice(command, stdout_only=True)</div><div>         executor = execute.execute(verbose=True, output=output_handler)</div><div>@@ -298,6 +308,7 @@ class coverage_run(object):</div><div>         self.executables = None</div><div>         self.symbolSets = []</div><div>         self.path_to_builddir= path_to_builddir</div><div>+        self.gcnos_file_path = path.join(self.coverageConfigPath, "rtems.gcnos")</div><div> </div><div>     def prepareEnvironment(self):</div><div>         if(path.exists(self.tracesDir)):</div><div>@@ -311,7 +322,7 @@ class coverage_run(object):</div><div>         ccf.write("target = " + self.config_map['target'][2] + '\n')</div><div>         ccf.write("explanations = " + self.macros.expand(self.config_map['explanations'][2]) + '\n')</div><div>         ccf.write("coverageExtension = " + self.config_map['coverageextension'][2] + '\n')</div><div>-        ccf.write("gcnosFile = " + self.macros.expand(self.config_map['gcnosfile'][2]) + '\n')</div><div>+        #ccf.write("gcnosFile = " + self.macros.expand(self.config_map['gcnosfile'][2]) + '\n')</div><div>         ccf.write("executableExtension = " + self.config_map['executableextension'][2] + '\n')</div><div>         ccf.write("projectName = " + self.config_map['projectname'][2] + '\n')</div><div>         ccf.close()</div><div>@@ -334,6 +345,11 @@ class coverage_run(object):</div><div> </div><div>         symbolConfig = symbolsConfiguration()</div><div>         symbolConfig.load(self.symbolConfigPath, self.path_to_builddir)</div><div>+        # create gcnosConfiguration</div><div>+        # load paths to gcno files, join paths with path_to_builddir</div><div>+        # write gcnos file to traces dir</div><div>+        gcnos_file = path.join(self.tracesDir, "rtems.gcnos") </div><div>+        gcnos().create_gcnos_file(self.gcnos_file_path, gcnos_file, self.path_to_builddir)</div><div> </div><div>         for sset in symbolConfig.symbolSets:</div><div>             if sset.isValid():</div><div>@@ -342,7 +358,7 @@ class coverage_run(object):</div><div>                 self.symbolSets.append(<a href="http://sset.name">sset.name</a>)</div><div> </div><div>                 covoar_run = covoar(self.testDir, self.symbolConfigPath, self.tracesDir, path.join(self.rtdir, 'covoar'))</div><div>-                covoar_run.run(<a href="http://sset.name">sset.name</a>, covoarConfigFile, symbolSetFile)</div><div>+                covoar_run.run(<a href="http://sset.name">sset.name</a>, covoarConfigFile, symbolSetFile, gcnos_file)</div><div>             else:</div><div>                 log.stderr("Invalid symbol set " + <a href="http://sset.name">sset.name</a> + ". Skipping covoar run.")</div><div> </div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a> b/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>index bd552bd..660301d 100644</div><div>--- a/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>+++ b/tester/rtems/testing/bsps/<a href="http://leon2-coverage.mc">leon2-coverage.mc</a></div><div>@@ -59,6 +59,6 @@ format:<span class="Apple-tab-span" style="white-space:pre">          </span>                none,    none,     'QEMU'</div><div> target:<span class="Apple-tab-span" style="white-space:pre">               </span>                none,    none,     'sparc-rtems4.11'</div><div> explanations:<span class="Apple-tab-span" style="white-space:pre">      </span>            none,    none,     '%{_rtscripts}/coverage/Explanations.txt'</div><div> coverageExtension:<span class="Apple-tab-span" style="white-space:pre">       </span>      none,    none,     'exe.cov'</div><div>-gcnosFile:<span class="Apple-tab-span" style="white-space:pre"> </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div>+# gcnosFile:<span class="Apple-tab-span" style="white-space:pre">        </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div> executableExtension:<span class="Apple-tab-span" style="white-space:pre">       </span>    none,    none,     'exe'</div><div> projectName:<span class="Apple-tab-span" style="white-space:pre">     </span>            none,    none,     'RTEMS 4.11'</div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a> b/tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a></div><div>index ae25268..a64cd1c 100644</div><div>--- a/tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a></div><div>+++ b/tester/rtems/testing/bsps/<a href="http://leon3-coverage.mc">leon3-coverage.mc</a></div><div>@@ -59,6 +59,6 @@ format:<span class="Apple-tab-span" style="white-space:pre">          </span>                none,    none,     'QEMU'</div><div> target:<span class="Apple-tab-span" style="white-space:pre">               </span>                none,    none,     'sparc-rtems4.11'</div><div> explanations:<span class="Apple-tab-span" style="white-space:pre">      </span>            none,    none,     '%{_rtscripts}/coverage/Explanations.txt'</div><div> coverageExtension:<span class="Apple-tab-span" style="white-space:pre">       </span>      none,    none,     'exe.cov'</div><div>-gcnosFile:<span class="Apple-tab-span" style="white-space:pre"> </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div>+# gcnosFile:<span class="Apple-tab-span" style="white-space:pre">        </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div> executableExtension:<span class="Apple-tab-span" style="white-space:pre">       </span>    none,    none,     'exe'</div><div> projectName:<span class="Apple-tab-span" style="white-space:pre">     </span>            none,    none,     'RTEMS 4.11'</div><div>diff --git a/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a> b/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>index 2627aeb..791ac9b 100644</div><div>--- a/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>+++ b/tester/rtems/testing/bsps/<a href="http://pc386.mc">pc386.mc</a></div><div>@@ -61,6 +61,6 @@ format:<span class="Apple-tab-span" style="white-space:pre">          </span>                none,    none,     'QEMU'</div><div> target:<span class="Apple-tab-span" style="white-space:pre">               </span>                none,    none,     'i386-rtems4.11'</div><div> explanations:<span class="Apple-tab-span" style="white-space:pre">       </span>            none,    none,     '%{_rtscripts}/coverage/Explanations.txt'</div><div> coverageExtension:<span class="Apple-tab-span" style="white-space:pre">       </span>      none,    none,     'exe.cov'</div><div>-gcnosFile:<span class="Apple-tab-span" style="white-space:pre"> </span>              none,    none,     '/home/hf/tmp/rtems.gcnos'</div><div>+# gcnosFile:<span class="Apple-tab-span" style="white-space:pre">  </span>              none,    none,     '%{_rtscripts}/coverage/rtems.gcnos'</div><div> executableExtension:<span class="Apple-tab-span" style="white-space:pre">       </span>    none,    none,     'exe'</div><div> projectName:<span class="Apple-tab-span" style="white-space:pre">     </span>            none,    none,     'RTEMS 4.11'</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 45cdfc800597646940be4e1156a1e7967e63d714 Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Mon, 21 Sep 2015 13:39:36 +0200</div><div>Subject: [PATCH 17/18] added rtems.gcnos file which contains the relative</div><div> paths to the gcno files starting from the build directory</div><div><br></div><div>---</div><div> tester/rtems/testing/coverage/rtems.gcnos | 2 ++</div><div> 1 file changed, 2 insertions(+)</div><div> create mode 100644 tester/rtems/testing/coverage/rtems.gcnos</div><div><br></div><div>diff --git a/tester/rtems/testing/coverage/rtems.gcnos b/tester/rtems/testing/coverage/rtems.gcnos</div><div>new file mode 100644</div><div>index 0000000..7223192</div><div>--- /dev/null</div><div>+++ b/tester/rtems/testing/coverage/rtems.gcnos</div><div>@@ -0,0 +1,2 @@</div><div>+i386-rtems4.11/c/pc386/cpukit/score/src/libscore_a-timespecsubtract.gcno</div><div>+</div><div>-- </div><div>1.9.1</div><div><br></div><div><br></div><div>From 1daa55efe2826796d7f944756a740d2729efb6de Mon Sep 17 00:00:00 2001</div><div>From: hermann <<a href="mailto:hermann19829@gmail.com">hermann19829@gmail.com</a>></div><div>Date: Thu, 24 Sep 2015 12:51:03 +0200</div><div>Subject: [PATCH 18/18] added try-catch statement if hardlink to a test case</div><div> exe could not be produced</div><div><br></div><div>---</div><div> tester/rt/coverage.py                           |  6 +++++-</div><div> tester/rtems/testing/coverage/symbolSets.config | 26 ++++++++++++++++++++++++-</div><div> 2 files changed, 30 insertions(+), 2 deletions(-)</div><div><br></div><div>diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py</div><div>index b2242f7..0855801 100644</div><div>--- a/tester/rt/coverage.py</div><div>+++ b/tester/rt/coverage.py</div><div>@@ -371,7 +371,11 @@ class coverage_run(object):</div><div> </div><div>         for exe in self.executables:</div><div>             dst = path.join(self.tracesDir, path.basename(exe))</div><div>-            os.link(exe, dst)</div><div>+            try:</div><div>+                os.link(exe, dst)</div><div>+            except OSError, e:</div><div>+                log.stderr("creating hardlink from " + path.abspath(exe) + " to " + dst + " failed!")</div><div>+                raise</div><div>         log.notice("Symlinks made")</div><div> </div><div>     def _generateReports(self):</div><div>diff --git a/tester/rtems/testing/coverage/symbolSets.config b/tester/rtems/testing/coverage/symbolSets.config</div><div>index 0490287..b91f5c0 100644</div><div>--- a/tester/rtems/testing/coverage/symbolSets.config</div><div>+++ b/tester/rtems/testing/coverage/symbolSets.config</div><div>@@ -1,3 +1,27 @@</div><div> symbolset:</div><div> <span class="Apple-tab-span" style="white-space:pre">  </span>name=core</div><div>-<span class="Apple-tab-span" style="white-space:pre">   </span>lib=i386-rtems4.11/c/pc386/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>lib=sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>name=score</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=sparc-rtems4.11/c/leon2/cpukit/score/libscore.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>name=sapi</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>lib=sparc-rtems4.11/c/leon2/cpukit/sapi/libsapi.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre"> </span>name=rtems</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=sparc-rtems4.11/c/leon2/cpukit/rtems/librtems.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>name=libmisc</div><div>+<span class="Apple-tab-span" style="white-space:pre">        </span>lib=sparc-rtems4.11/c/leon2/cpukit/libmisc/libstackchk.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">     </span>lib=sparc-rtems4.11/c/leon2/cpukit/libmisc/libbspcmdline.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">  </span>lib=sparc-rtems4.11/c/leon2/cpukit/libmisc/libcpuuse.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">      </span>lib=sparc-rtems4.11/c/leon2/cpukit/libmisc/libfsmount.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">     </span>lib=sparc-rtems4.11/c/leon2/cpukit/libmisc/libstringto.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">    </span>lib=sparc-rtems4.11/c/leon2/cpukit/libmisc/libdevnull.a</div><div>+<span class="Apple-tab-span" style="white-space:pre">     </span>lib=sparc-rtems4.11/c/leon2/cpukit/libmisc/libdumpbuf.a</div><div>+symbolset:</div><div>+<span class="Apple-tab-span" style="white-space:pre">   </span>name=libblock</div><div>+<span class="Apple-tab-span" style="white-space:pre">       </span>lib=sparc-rtems4.11/c/leon2/cpukit/libblock/libblock.a</div><div>-- </div><div>1.9.1</div><div><br></div></div></div>