From patchwork Tue Jan 29 04:51:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 216427 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 D2ADB2C008E for ; Tue, 29 Jan 2013 15:53:38 +1100 (EST) Received: from localhost ([::1]:52428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U03CT-0003CZ-0X for incoming@patchwork.ozlabs.org; Mon, 28 Jan 2013 23:53:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U03C8-00030z-Kd for qemu-devel@nongnu.org; Mon, 28 Jan 2013 23:53:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U03C6-00026i-Jp for qemu-devel@nongnu.org; Mon, 28 Jan 2013 23:53:16 -0500 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:53920) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U03C6-00025w-2O for qemu-devel@nongnu.org; Mon, 28 Jan 2013 23:53:14 -0500 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Jan 2013 14:51:34 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 29 Jan 2013 14:51:30 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 5E85B357804D for ; Tue, 29 Jan 2013 15:53:05 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0T4r4ZR66060402 for ; Tue, 29 Jan 2013 15:53:04 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0T4r4n5003373 for ; Tue, 29 Jan 2013 15:53:05 +1100 Received: from RH63Wenchao (wenchaox.cn.ibm.com [9.115.122.102]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r0T4pS6R000639; Tue, 29 Jan 2013 15:53:03 +1100 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Tue, 29 Jan 2013 12:51:08 +0800 Message-Id: <1359435076-13673-2-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1359435076-13673-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1359435076-13673-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13012904-5140-0000-0000-000002AF70FD X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 202.81.31.141 Cc: kwolf@redhat.com, stefanha@gmail.com, aliguori@us.ibm.com, Wenchao Xia , pbonzini@redhat.com Subject: [Qemu-devel] [PATCH V16 1/9] build: add command check-clean 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 This command will package the clean operations in tests, to make it easy to be extended. Now root Makefile simply calls the command and do not care the details of it any more. Signed-off-by: Wenchao Xia --- Makefile | 1 - tests/Makefile | 12 +++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0d9099a..b2d7798 100644 --- a/Makefile +++ b/Makefile @@ -225,7 +225,6 @@ clean: rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) rm -rf qapi-generated rm -rf qga/qapi-generated - $(MAKE) -C tests/tcg clean for d in $(ALL_SUBDIRS); do \ if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ rm -f $$d/qemu-options.def; \ diff --git a/tests/Makefile b/tests/Makefile index c681ceb..a653532 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -134,6 +134,10 @@ qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a qtest-obj-y += tests/libi2c.o tests/libi2c-omap.o $(check-qtest-y): $(qtest-obj-y) +#clean rules + +CHECK_CLEAN_TARGETS = $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o + .PHONY: check-help check-help: @echo "Regression testing targets:" @@ -144,6 +148,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." @@ -203,10 +208,15 @@ check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) # Consolidated targets -.PHONY: check-qtest check-unit check +.PHONY: check-qtest check-unit check check-clean check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) 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 -rf $(CHECK_CLEAN_TARGETS) + +clean: check-clean -include $(wildcard tests/*.d)