On Tue, 27 Nov 2018 at 10:28, Chris Johns <chr...@rtems.org> wrote:

> On 27/11/2018 04:28, Vijay Kumar Banerjee wrote:
> > On Mon, 26 Nov 2018 at 16:27, Chris Johns <chr...@rtems.org
> > <mailto:chr...@rtems.org>> wrote:
> >     > On 26 Nov 2018, at 6:57 pm, Vijay Kumar Banerjee <
> vijaykumar9...@gmail.com
> >     <mailto:vijaykumar9...@gmail.com>> wrote:
> >     >
> >     >> On Mon, Nov 26, 2018 at 06:28:33PM +1100, Chris Johns wrote:
> >     >>
> >     >>> On 26 Nov 2018, at 5:21 pm, Vijay Kumar Banerjee
> >     <vijaykumar9...@gmail.com <mailto:vijaykumar9...@gmail.com>> wrote:
> >     >>> I'm getting the result Invalid while running hello.exe with
> rtems-test
> >     on leon3 (without coverage option)
> >     >>> attaching the log.
> >     >>
> >     >> Can you please revert or not apply patch 1 and let me know what
> happens?
> >     I have a feeling the coverage Qemu may be the old or different
> settings.
> >     > it works after reverting the first patch.
> >
> >     Can you define ‘qemu_use_serial_console’ when coverage is enabled?
> Doing
> >     this will work with the coverage qemu.
> >
> > ..... how to do that ?
> >
>
> I would:
>
> 1. Define 'coverage' in tester/rt/coverage.py in 'macros_'. See macrocs.py
> for
> the call
> https://git.rtems.org/rtems-tools/tree/rtemstoolkit/macros.py#n442.
>
> 2. In
> https://git.rtems.org/rtems-tools/tree/tester/rtems/testing/qemu.cfg#n61
> move this logic up to line 51 and use something like:
>
>  #
>  # Coverage, some builds of qemu support coverage.
>  #
>  %ifdef coverage
>   %define qemu_use_serial_console
>   %ifn %{defined bsp_qemu_cov_opts}
>    %define bsp_qemu_cov_opts %{nil}
>   %endif
>  %endif
>
> Thank you for explaining in such detail. It's working after this change.
I have attached the patch in this email.

> Chris
>
From 394eb1c59adc5d3c3f2fcbc12063fbfb040970c6 Mon Sep 17 00:00:00 2001
From: Vijay Kumar Banerjee <vijaykumar9...@gmail.com>
Date: Tue, 27 Nov 2018 13:25:08 +0530
Subject: [PATCH] tester : Add support to use QEMU serial console when coverage
 is enabled

---
 tester/rt/coverage.py         |  1 +
 tester/rtems/testing/qemu.cfg | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/tester/rt/coverage.py b/tester/rt/coverage.py
index 9ff27ad..9fc9b64 100644
--- a/tester/rt/coverage.py
+++ b/tester/rt/coverage.py
@@ -363,6 +363,7 @@ class coverage_run(object):
         self.target = self.macros['target']
         self.bsp_name = self.macros['bsp'].split('-')[0]
         self.prefix = prefix
+        self.macros.define('coverage')
 
     def run(self):
         try:
diff --git a/tester/rtems/testing/qemu.cfg b/tester/rtems/testing/qemu.cfg
index e37dc9b..d0c6ac7 100644
--- a/tester/rtems/testing/qemu.cfg
+++ b/tester/rtems/testing/qemu.cfg
@@ -48,6 +48,16 @@
 #
 %include %{_rtdir}/rtems/version.cfg
 
+#
+# Coverage, some builds of qemu support coverage.
+#
+%ifdef coverage
+ %define qemu_use_serial_console
+ %ifn %{defined bsp_qemu_cov_opts}
+  %define bsp_qemu_cov_opts %{nil}
+ %endif
+%endif
+
 #
 # Qemu common option patterns.
 #
@@ -58,13 +68,6 @@
 %endif
 %define qemu_opts_no_net -net none
 
-#
-# Coverage, some builds of qemu support coverage.
-#
-%ifn %{defined bsp_qemu_cov_opts}
- %define bsp_qemu_cov_opts %{nil}
-%endif
-
 #
 # Qemu executable
 #
-- 
2.17.2

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to