From patchwork Fri Nov 16 13:31:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 199592 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 416B02C0092 for ; Sat, 17 Nov 2012 00:34:39 +1100 (EST) Received: from localhost ([::1]:49414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZM45-0002fU-4o for incoming@patchwork.ozlabs.org; Fri, 16 Nov 2012 08:34:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZM3i-0002OG-LD for qemu-devel@nongnu.org; Fri, 16 Nov 2012 08:34:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZM3f-0007HW-H1 for qemu-devel@nongnu.org; Fri, 16 Nov 2012 08:34:14 -0500 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:54387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZM3e-0007Ce-TD for qemu-devel@nongnu.org; Fri, 16 Nov 2012 08:34:11 -0500 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Nov 2012 19:04:08 +0530 Received: from d28relay04.in.ibm.com (9.184.220.61) by e28smtp04.in.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 16 Nov 2012 19:04:04 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAGDY32E8651186 for ; Fri, 16 Nov 2012 19:04:03 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAGDY3Fg007738 for ; Sat, 17 Nov 2012 00:34:03 +1100 Received: from RedHat62GAWSWenchao ([9.125.28.23]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id qAGDVw72030586; Sat, 17 Nov 2012 00:34:00 +1100 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Fri, 16 Nov 2012 21:31:56 +0800 Message-Id: <1353072718-29159-3-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1353072718-29159-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1353072718-29159-1-git-send-email-xiawenc@linux.vnet.ibm.com> x-cbid: 12111613-5564-0000-0000-0000055D0A9A X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.4 Cc: kwolf@redhat.com, peter.maydell@linaro.org, aliguori@us.ibm.com, stefanha@gmail.com, blauwirbel@gmail.com, pbonzini@redhat.com, Wenchao Xia Subject: [Qemu-devel] [PATCH V2 2/4] Buildsystem clean tests directory clearly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Currently root Makefile try clean tests/tcg, hard to extend. This patch added command make check-clean, which clean all generated files used in tests. With this command root Makefile do not care tests clean method any more, it simply calls the command to do it, so any more clean script could be added in tests/Makefile, make it easier to extend. v2: Discard env MAKEFILES, always include tests/Makefile. Signed-off-by: Wenchao Xia --- Makefile | 6 ++---- configure | 2 +- tests/Makefile | 7 +++++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f0bb845..f7d1e0d 100644 --- a/Makefile +++ b/Makefile @@ -203,9 +203,7 @@ qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated gen-out-type = $(subst .,-,$(suffix $@)) -ifneq ($(wildcard config-host.mak),) -include $(SRC_PATH)/tests/Makefile -endif +include tests/Makefile qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py @@ -251,7 +249,7 @@ clean: rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) rm -rf qapi-generated rm -rf qga/qapi-generated - $(MAKE) -C tests/tcg clean + $(MAKE) check-clean for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \ if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ rm -f $$d/qemu-options.def; \ diff --git a/configure b/configure index f847ee2..a18e267 100755 --- a/configure +++ b/configure @@ -4163,7 +4163,7 @@ DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas" DIRS="$DIRS roms/seabios roms/vgabios" DIRS="$DIRS qapi-generated" DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace" -FILES="Makefile tests/tcg/Makefile qdict-test-data.txt" +FILES="Makefile tests/Makefile tests/tcg/Makefile qdict-test-data.txt" FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile" FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" diff --git a/tests/Makefile b/tests/Makefile index 9bf0765..a286622 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -94,6 +94,7 @@ check-help: @echo " make check-unit Run qobject tests" @echo " make check-block Run block tests" @echo " make check-report.html Generates an HTML test report" + @echo " make check-clean Clean the tests" @echo @echo "Please note that HTML reports do not regenerate if the unit tests" @echo "has not changed." @@ -148,4 +149,10 @@ check-unit: $(patsubst %,check-%, $(check-unit-y)) check-block: $(patsubst %,check-%, $(check-block-y)) check: check-unit check-qtest +check-clean: + $(MAKE) -C tests/tcg clean + rm -f $(check-unit-y) + rm -f $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) + rm -f tests/*.o + -include $(wildcard tests/*.d)