From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com,
blauwirbel@gmail.com, pbonzini@redhat.com,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v13 1/7] Build system clean tests directory clearly
Date: Fri, 30 Nov 2012 14:17:17 +0800 [thread overview]
Message-ID: <1354256243-8375-2-git-send-email-xiawenc@linux.vnet.ibm.com> (raw)
In-Reply-To: <1354256243-8375-1-git-send-email-xiawenc@linux.vnet.ibm.com>
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.
v3:
Add check-clean to .PHONY.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
Makefile | 6 ++----
configure | 2 +-
tests/Makefile | 9 ++++++++-
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 9ecbcbb..b04d862 100644
--- a/Makefile
+++ b/Makefile
@@ -211,9 +211,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
@@ -259,7 +257,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 994f731..c02994d 100755
--- a/configure
+++ b/configure
@@ -4182,7 +4182,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 b60f0fb..0062ff1 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -98,6 +98,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."
@@ -146,10 +147,16 @@ 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 -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)
--
1.7.1
next prev parent reply other threads:[~2012-11-30 6:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-30 6:17 [Qemu-devel] [PATCH v13 0/7] libqblock qemu block layer library Wenchao Xia
2012-11-30 6:17 ` Wenchao Xia [this message]
2012-11-30 6:17 ` [Qemu-devel] [PATCH v13 2/7] block export function path_has_protocol Wenchao Xia
2012-11-30 6:17 ` [Qemu-devel] [PATCH v13 3/7] stubs add set_fd_handler and signalfd_available Wenchao Xia
2012-11-30 6:17 ` [Qemu-devel] [PATCH v13 4/7] libqblock build system Wenchao Xia
2012-11-30 6:17 ` [Qemu-devel] [PATCH v13 5/7] libqblock API design and type defines Wenchao Xia
2012-11-30 6:17 ` [Qemu-devel] [PATCH v13 6/7] libqblock API implement Wenchao Xia
2012-11-30 6:17 ` [Qemu-devel] [PATCH v13 7/7] libqblock test example Wenchao Xia
2012-12-09 4:52 ` [Qemu-devel] [PATCH v13 0/7] libqblock qemu block layer library Wenchao Xia
2012-12-14 10:06 ` Wenchao Xia
2012-12-14 10:17 ` Paolo Bonzini
2013-01-21 11:15 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354256243-8375-2-git-send-email-xiawenc@linux.vnet.ibm.com \
--to=xiawenc@linux.vnet.ibm.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).