diff mbox

[V2,2/2] tests: Tweak the Makefile to produce per-test output.

Message ID 1394532550-21857-3-git-send-email-marcel.a@redhat.com
State New
Headers show

Commit Message

Marcel Apfelbaum March 11, 2014, 10:09 a.m. UTC
From: Stefan Hajnoczi <stefanha@redhat.com>

The effect is that the output will grow, but we will know
which qtest failed. This helps when an asert is made on
other code and not in the test itself.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Blake March 11, 2014, 12:07 p.m. UTC | #1
On 03/11/2014 04:09 AM, Marcel Apfelbaum wrote:
> From: Stefan Hajnoczi <stefanha@redhat.com>
> 
> The effect is that the output will grow, but we will know
> which qtest failed. This helps when an asert is made on

s/asert/assert/

> other code and not in the test itself.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
> ---
>  tests/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index b17d41e..a8405c8 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -273,7 +273,7 @@ check-help:
>  	@echo "changed with variable GTESTER_OPTIONS."
>  
>  SPEED = quick
> -GTESTER_OPTIONS = -k $(if $(V),--verbose,-q)
> +GTESTER_OPTIONS = -k #$(if $(V),--verbose,-q)

Isn't this effectively commenting out the rest of the line?  If so, why
not delete everything after the #?
Marcel Apfelbaum March 11, 2014, 12:27 p.m. UTC | #2
On Tue, 2014-03-11 at 06:07 -0600, Eric Blake wrote:
> On 03/11/2014 04:09 AM, Marcel Apfelbaum wrote:
> > From: Stefan Hajnoczi <stefanha@redhat.com>
> > 
> > The effect is that the output will grow, but we will know
> > which qtest failed. This helps when an asert is made on
> 
> s/asert/assert/
Sure,

> 
> > other code and not in the test itself.
> > 
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
> > ---
> >  tests/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/Makefile b/tests/Makefile
> > index b17d41e..a8405c8 100644
> > --- a/tests/Makefile
> > +++ b/tests/Makefile
> > @@ -273,7 +273,7 @@ check-help:
> >  	@echo "changed with variable GTESTER_OPTIONS."
> >  
> >  SPEED = quick
> > -GTESTER_OPTIONS = -k $(if $(V),--verbose,-q)
> > +GTESTER_OPTIONS = -k #$(if $(V),--verbose,-q)
> 
> Isn't this effectively commenting out the rest of the line?  If so, why
> not delete everything after the #?
Hi Eric, thank you for catching this.
Indeed, what I actually want to do is to remove the -q flag.
I sent V3 that fixes this,

Thanks,
Marcel

>
Stefan Hajnoczi March 11, 2014, 12:45 p.m. UTC | #3
On Tue, Mar 11, 2014 at 12:09:10PM +0200, Marcel Apfelbaum wrote:
> From: Stefan Hajnoczi <stefanha@redhat.com>
> 
> The effect is that the output will grow, but we will know
> which qtest failed. This helps when an asert is made on
> other code and not in the test itself.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
> ---
>  tests/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/Makefile b/tests/Makefile
> index b17d41e..a8405c8 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -273,7 +273,7 @@ check-help:
>  	@echo "changed with variable GTESTER_OPTIONS."
>  
>  SPEED = quick
> -GTESTER_OPTIONS = -k $(if $(V),--verbose,-q)
> +GTESTER_OPTIONS = -k #$(if $(V),--verbose,-q)
>  GCOV_OPTIONS = -n $(if $(V),-f,)
>  
>  # gtester tests, possibly with verbose output

I didn't propose this as a QEMU patch so I didn't add my Signed-off-by:.
I just posted a diff to show you that gtester without -q prints the test
binary names.

Please drop this patch and I'll send a final patch after I've checked
the output is still clean and doesn't duplicate information.
Marcel Apfelbaum March 11, 2014, 12:52 p.m. UTC | #4
On Tue, 2014-03-11 at 13:45 +0100, Stefan Hajnoczi wrote:
> On Tue, Mar 11, 2014 at 12:09:10PM +0200, Marcel Apfelbaum wrote:
> > From: Stefan Hajnoczi <stefanha@redhat.com>
> > 
> > The effect is that the output will grow, but we will know
> > which qtest failed. This helps when an asert is made on
> > other code and not in the test itself.
> > 
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
> > ---
> >  tests/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/Makefile b/tests/Makefile
> > index b17d41e..a8405c8 100644
> > --- a/tests/Makefile
> > +++ b/tests/Makefile
> > @@ -273,7 +273,7 @@ check-help:
> >  	@echo "changed with variable GTESTER_OPTIONS."
> >  
> >  SPEED = quick
> > -GTESTER_OPTIONS = -k $(if $(V),--verbose,-q)
> > +GTESTER_OPTIONS = -k #$(if $(V),--verbose,-q)
> >  GCOV_OPTIONS = -n $(if $(V),-f,)
> >  
> >  # gtester tests, possibly with verbose output
> 
> I didn't propose this as a QEMU patch so I didn't add my Signed-off-by:.
> I just posted a diff to show you that gtester without -q prints the test
> binary names.
> 
> Please drop this patch and I'll send a final patch after I've checked
> the output is still clean and doesn't duplicate information.
Sure,
Marcel
diff mbox

Patch

diff --git a/tests/Makefile b/tests/Makefile
index b17d41e..a8405c8 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -273,7 +273,7 @@  check-help:
 	@echo "changed with variable GTESTER_OPTIONS."
 
 SPEED = quick
-GTESTER_OPTIONS = -k $(if $(V),--verbose,-q)
+GTESTER_OPTIONS = -k #$(if $(V),--verbose,-q)
 GCOV_OPTIONS = -n $(if $(V),-f,)
 
 # gtester tests, possibly with verbose output