* [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests
@ 2013-10-30 15:07 Stefan Hajnoczi
2013-10-30 16:09 ` Paolo Bonzini
2013-10-30 16:12 ` Andreas Färber
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2013-10-30 15:07 UTC (permalink / raw)
To: qemu-devel; +Cc: Andreas Färber, Anthony Liguori, Markus Armbruster
I came across this little tests/Makefile annoyance:
If you modify QEMU code and then run "make check" it will not rebuild QEMU.
This can be confusing during development when you expect changing the
code and rerunning the tests to pass :).
I played with tests/Makefile but was unable to add the right
dependency. We need something that makes all libqtest tests depend on
$(TARGET)-softmmu/qemu-system-$(TARGET) at "make check" time.
This way QEMU gets rebuilt if "make check" will execute the QEMU binary.
Any ideas?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests
2013-10-30 15:07 [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests Stefan Hajnoczi
@ 2013-10-30 16:09 ` Paolo Bonzini
2013-10-31 12:30 ` Stefan Hajnoczi
2013-10-30 16:12 ` Andreas Färber
1 sibling, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2013-10-30 16:09 UTC (permalink / raw)
To: Stefan Hajnoczi
Cc: Markus Armbruster, qemu-devel, Anthony Liguori,
Andreas Färber
Il 30/10/2013 16:07, Stefan Hajnoczi ha scritto:
> I came across this little tests/Makefile annoyance:
> If you modify QEMU code and then run "make check" it will not rebuild QEMU.
>
> This can be confusing during development when you expect changing the
> code and rerunning the tests to pass :).
>
> I played with tests/Makefile but was unable to add the right
> dependency. We need something that makes all libqtest tests depend on
> $(TARGET)-softmmu/qemu-system-$(TARGET) at "make check" time.
>
> This way QEMU gets rebuilt if "make check" will execute the QEMU binary.
>
> Any ideas?
Does this work?
diff --git a/tests/Makefile b/tests/Makefile
index fa4c9f0..f3f78ee 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -212,7 +212,7 @@ GCOV_OPTIONS = -n $(if $(V),-f,)
# gtester tests, possibly with verbose output
.PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS))
-$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: $(check-qtest-y)
+$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: $(check-qtest-y) subdir-%-softmmu
$(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,)
$(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$((RANDOM % 255 + 1))} \
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests
2013-10-30 15:07 [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests Stefan Hajnoczi
2013-10-30 16:09 ` Paolo Bonzini
@ 2013-10-30 16:12 ` Andreas Färber
1 sibling, 0 replies; 4+ messages in thread
From: Andreas Färber @ 2013-10-30 16:12 UTC (permalink / raw)
To: Stefan Hajnoczi, qemu-devel; +Cc: Markus Armbruster, Anthony Liguori
Am 30.10.2013 16:07, schrieb Stefan Hajnoczi:
> I came across this little tests/Makefile annoyance:
> If you modify QEMU code and then run "make check" it will not rebuild QEMU.
>
> This can be confusing during development when you expect changing the
> code and rerunning the tests to pass :).
>
> I played with tests/Makefile but was unable to add the right
> dependency. We need something that makes all libqtest tests depend on
> $(TARGET)-softmmu/qemu-system-$(TARGET) at "make check" time.
>
> This way QEMU gets rebuilt if "make check" will execute the QEMU binary.
>
> Any ideas?
Technically, tests/Makefile is part of ./Makefile, whereas
qemu-system-$(TARGET) gets built recursively in Makefile.target.
Thus, something like this might work:
check-qtest-x86_64: subdir-x86_64-softmmu
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests
2013-10-30 16:09 ` Paolo Bonzini
@ 2013-10-31 12:30 ` Stefan Hajnoczi
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2013-10-31 12:30 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Markus Armbruster, qemu-devel, Anthony Liguori,
Andreas Färber
On Wed, Oct 30, 2013 at 05:09:26PM +0100, Paolo Bonzini wrote:
> Il 30/10/2013 16:07, Stefan Hajnoczi ha scritto:
> > I came across this little tests/Makefile annoyance:
> > If you modify QEMU code and then run "make check" it will not rebuild QEMU.
> >
> > This can be confusing during development when you expect changing the
> > code and rerunning the tests to pass :).
> >
> > I played with tests/Makefile but was unable to add the right
> > dependency. We need something that makes all libqtest tests depend on
> > $(TARGET)-softmmu/qemu-system-$(TARGET) at "make check" time.
> >
> > This way QEMU gets rebuilt if "make check" will execute the QEMU binary.
> >
> > Any ideas?
>
> Does this work?
>
> diff --git a/tests/Makefile b/tests/Makefile
> index fa4c9f0..f3f78ee 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -212,7 +212,7 @@ GCOV_OPTIONS = -n $(if $(V),-f,)
> # gtester tests, possibly with verbose output
>
> .PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS))
> -$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: $(check-qtest-y)
> +$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: $(check-qtest-y) subdir-%-softmmu
> $(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,)
> $(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
> MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$((RANDOM % 255 + 1))} \
Yes, it does!
Yesterday I tried the same approach with "%-softmmu/qemu-system-%". The
'%' is only expanded once so it failed.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-31 12:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-30 15:07 [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests Stefan Hajnoczi
2013-10-30 16:09 ` Paolo Bonzini
2013-10-31 12:30 ` Stefan Hajnoczi
2013-10-30 16:12 ` Andreas Färber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).