From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbrOr-0004BJ-5i for qemu-devel@nongnu.org; Thu, 31 Oct 2013 08:31:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbrOi-0008R6-P7 for qemu-devel@nongnu.org; Thu, 31 Oct 2013 08:30:57 -0400 Received: from mail-ea0-x231.google.com ([2a00:1450:4013:c01::231]:52576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbrOi-0008Qq-IK for qemu-devel@nongnu.org; Thu, 31 Oct 2013 08:30:48 -0400 Received: by mail-ea0-f177.google.com with SMTP id f15so1347346eak.22 for ; Thu, 31 Oct 2013 05:30:47 -0700 (PDT) Date: Thu, 31 Oct 2013 13:30:44 +0100 From: Stefan Hajnoczi Message-ID: <20131031123044.GA3605@stefanha-thinkpad.redhat.com> References: <52712F36.5060102@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52712F36.5060102@redhat.com> Subject: Re: [Qemu-devel] How to add qemu-system-$(target) as a dependency for qtests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Markus Armbruster , qemu-devel , Anthony Liguori , Andreas =?iso-8859-1?Q?F=E4rber?= 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