qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] How to add qemu-system-$(target) as a dependency for qt


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests
Date: Thu, 31 Oct 2013 13:30:44 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]