* [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test*
@ 2013-09-26 0:42 Wenchao Xia
2013-09-26 0:42 ` [Qemu-devel] [PATCH V2 1/2] tests: build the helper program by default Wenchao Xia
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Wenchao Xia @ 2013-09-26 0:42 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, pbonzini, mjt, Wenchao Xia, stefanha
v2:
Address Michael's comments:
01: better commit message to tip what it is doing.
Wenchao Xia (2):
1 tests: build the helper program by default
2 build: add command check-clean
Makefile | 1 -
tests/Makefile | 16 ++++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH V2 1/2] tests: build the helper program by default
2013-09-26 0:42 [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test* Wenchao Xia
@ 2013-09-26 0:42 ` Wenchao Xia
2013-09-26 0:42 ` [Qemu-devel] [PATCH V2 2/2] build: add command check-clean Wenchao Xia
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Wenchao Xia @ 2013-09-26 0:42 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, pbonzini, mjt, Wenchao Xia, stefanha
Usually we may configure and make, then goto ./tests/qemu-iotest,
check. In this case an error will happen since helper program
was not built. This patch simply build it by default. A better way
may be introducing Makefile in ./tests/qemu-iotest, but it is more
complicate to handle out of tree case, and a bit overkill
for a single file now, we can do that when more files come.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
tests/Makefile | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index 994fef1..5f2894f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -252,8 +252,10 @@ check-report.html: check-report.xml
# Other tests
+QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXESUF)
+
.PHONY: check-tests/qemu-iotests-quick.sh
-check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) tests/qemu-iotests/socket_scm_helper$(EXESUF)
+check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) $(QEMU_IOTESTS_HELPERS-y)
$<
.PHONY: check-tests/test-qapi.py
@@ -275,5 +277,9 @@ check-unit: $(patsubst %,check-%, $(check-unit-y))
check-block: $(patsubst %,check-%, $(check-block-y))
check: check-qapi-schema check-unit check-qtest
+# Build the help program automatically
+
+all: $(QEMU_IOTESTS_HELPERS-y)
+
-include $(wildcard tests/*.d)
-include $(wildcard tests/libqos/*.d)
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH V2 2/2] build: add command check-clean
2013-09-26 0:42 [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test* Wenchao Xia
2013-09-26 0:42 ` [Qemu-devel] [PATCH V2 1/2] tests: build the helper program by default Wenchao Xia
@ 2013-09-26 0:42 ` Wenchao Xia
2013-09-26 5:35 ` [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test* Fam Zheng
2013-10-11 9:37 ` Wenchao Xia
3 siblings, 0 replies; 5+ messages in thread
From: Wenchao Xia @ 2013-09-26 0:42 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, pbonzini, mjt, Wenchao Xia, stefanha
This command will package the clean operations in tests. Now root Makefile
simply calls the command and do not care the details of it any more. Original
the built binaries for test will not be removed, now they will be deleted
in clean operation.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
Makefile | 1 -
tests/Makefile | 8 +++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 60fb87e..b15003f 100644
--- a/Makefile
+++ b/Makefile
@@ -246,7 +246,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 5f2894f..643c89c 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -196,6 +196,7 @@ check-help:
@echo " make check-qapi-schema Run QAPI schema 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."
@@ -270,12 +271,17 @@ $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
# Consolidated targets
-.PHONY: check-qapi-schema check-qtest check-unit check
+.PHONY: check-qapi-schema check-qtest check-unit check check-clean
check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y))
check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
check-unit: $(patsubst %,check-%, $(check-unit-y))
check-block: $(patsubst %,check-%, $(check-block-y))
check: check-qapi-schema check-unit check-qtest
+check-clean:
+ $(MAKE) -C tests/tcg clean
+ rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
+
+clean: check-clean
# Build the help program automatically
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test*
2013-09-26 0:42 [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test* Wenchao Xia
2013-09-26 0:42 ` [Qemu-devel] [PATCH V2 1/2] tests: build the helper program by default Wenchao Xia
2013-09-26 0:42 ` [Qemu-devel] [PATCH V2 2/2] build: add command check-clean Wenchao Xia
@ 2013-09-26 5:35 ` Fam Zheng
2013-10-11 9:37 ` Wenchao Xia
3 siblings, 0 replies; 5+ messages in thread
From: Fam Zheng @ 2013-09-26 5:35 UTC (permalink / raw)
To: Wenchao Xia; +Cc: kwolf, pbonzini, mjt, qemu-devel, stefanha
On Thu, 09/26 08:42, Wenchao Xia wrote:
> v2:
> Address Michael's comments:
> 01: better commit message to tip what it is doing.
>
> Wenchao Xia (2):
> 1 tests: build the helper program by default
> 2 build: add command check-clean
>
> Makefile | 1 -
> tests/Makefile | 16 ++++++++++++++--
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
>
Reviewed-by: Fam Zheng <famz@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test*
2013-09-26 0:42 [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test* Wenchao Xia
` (2 preceding siblings ...)
2013-09-26 5:35 ` [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test* Fam Zheng
@ 2013-10-11 9:37 ` Wenchao Xia
3 siblings, 0 replies; 5+ messages in thread
From: Wenchao Xia @ 2013-10-11 9:37 UTC (permalink / raw)
To: Wenchao Xia; +Cc: kwolf, pbonzini, mjt, qemu-devel, stefanha
于 2013/9/26 8:42, Wenchao Xia 写道:
> v2:
> Address Michael's comments:
> 01: better commit message to tip what it is doing.
>
> Wenchao Xia (2):
> 1 tests: build the helper program by default
> 2 build: add command check-clean
>
> Makefile | 1 -
> tests/Makefile | 16 ++++++++++++++--
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
>
ping?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-11 9:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-26 0:42 [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test* Wenchao Xia
2013-09-26 0:42 ` [Qemu-devel] [PATCH V2 1/2] tests: build the helper program by default Wenchao Xia
2013-09-26 0:42 ` [Qemu-devel] [PATCH V2 2/2] build: add command check-clean Wenchao Xia
2013-09-26 5:35 ` [Qemu-devel] [PATCH V2 0/2] build: trivial patches for test* Fam Zheng
2013-10-11 9:37 ` Wenchao Xia
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).