From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbYL0-0005B6-U5 for qemu-devel@nongnu.org; Wed, 30 Oct 2013 12:09:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbYKq-0007fw-Gh for qemu-devel@nongnu.org; Wed, 30 Oct 2013 12:09:42 -0400 Received: from mail-qe0-x231.google.com ([2607:f8b0:400d:c02::231]:43290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbYKq-0007fl-D6 for qemu-devel@nongnu.org; Wed, 30 Oct 2013 12:09:32 -0400 Received: by mail-qe0-f49.google.com with SMTP id a11so959643qen.36 for ; Wed, 30 Oct 2013 09:09:32 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <52712F36.5060102@redhat.com> Date: Wed, 30 Oct 2013 17:09:26 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Stefan Hajnoczi Cc: Markus Armbruster , qemu-devel , Anthony Liguori , =?ISO-8859-1?Q?Andreas_F=E4rber?= 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))} \