qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH V2 0/4] Buildsystem fix and block func export
@ 2012-11-16 13:31 Wenchao Xia
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 1/4] Buildsystem fix distclean error for pixman Wenchao Xia
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Wenchao Xia @ 2012-11-16 13:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: kwolf, peter.maydell, aliguori, stefanha, blauwirbel, pbonzini,
	Wenchao Xia


Wenchao Xia (4):
  Buildsystem fix distclean error for pixman
  Buildsystem clean tests directory clearly
  Buildsystem move qapi generation to Makefile.objs
  block export function path_has_protocol

 Makefile       |   30 +++---------------------------
 Makefile.objs  |   22 ++++++++++++++++++++++
 block.c        |    2 +-
 block.h        |    2 ++
 configure      |    2 +-
 tests/Makefile |    7 +++++++
 6 files changed, 36 insertions(+), 29 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH V2 1/4] Buildsystem fix distclean error for pixman
  2012-11-16 13:31 [Qemu-devel] [PATCH V2 0/4] Buildsystem fix and block func export Wenchao Xia
@ 2012-11-16 13:31 ` Wenchao Xia
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 2/4] Buildsystem clean tests directory clearly Wenchao Xia
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Wenchao Xia @ 2012-11-16 13:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: kwolf, peter.maydell, aliguori, stefanha, blauwirbel, pbonzini,
	Wenchao Xia

  Currently Makefile test if pixman have configure log, but it
will return error if that file do not exist. This patch fix it.

v2: print out the command.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 81c660f..f0bb845 100644
--- a/Makefile
+++ b/Makefile
@@ -278,7 +278,7 @@ distclean: clean
 	for d in $(TARGET_DIRS) $(QEMULIBS); do \
 	rm -rf $$d || exit 1 ; \
         done
-	test -f pixman/config.log && make -C pixman distclean
+	if test -f pixman/config.log; then make -C pixman distclean; fi
 
 KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
 ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH V2 2/4] Buildsystem clean tests directory clearly
  2012-11-16 13:31 [Qemu-devel] [PATCH V2 0/4] Buildsystem fix and block func export Wenchao Xia
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 1/4] Buildsystem fix distclean error for pixman Wenchao Xia
@ 2012-11-16 13:31 ` Wenchao Xia
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 3/4] Buildsystem move qapi generation to Makefile.objs Wenchao Xia
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 4/4] block export function path_has_protocol Wenchao Xia
  3 siblings, 0 replies; 5+ messages in thread
From: Wenchao Xia @ 2012-11-16 13:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: kwolf, peter.maydell, aliguori, stefanha, blauwirbel, pbonzini,
	Wenchao Xia

  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 <xiawenc@linux.vnet.ibm.com>
---
 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)
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH V2 3/4] Buildsystem move qapi generation to Makefile.objs
  2012-11-16 13:31 [Qemu-devel] [PATCH V2 0/4] Buildsystem fix and block func export Wenchao Xia
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 1/4] Buildsystem fix distclean error for pixman Wenchao Xia
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 2/4] Buildsystem clean tests directory clearly Wenchao Xia
@ 2012-11-16 13:31 ` Wenchao Xia
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 4/4] block export function path_has_protocol Wenchao Xia
  3 siblings, 0 replies; 5+ messages in thread
From: Wenchao Xia @ 2012-11-16 13:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: kwolf, peter.maydell, aliguori, stefanha, blauwirbel, pbonzini,
	Wenchao Xia

  With this patch Makfile.objs control file auto generation, sub
Makefiles could use file generation more easily.

v2:
  rebase and better doc.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 Makefile      |   22 ----------------------
 Makefile.objs |   22 ++++++++++++++++++++++
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/Makefile b/Makefile
index f7d1e0d..b8a6680 100644
--- a/Makefile
+++ b/Makefile
@@ -205,28 +205,6 @@ gen-out-type = $(subst .,-,$(suffix $@))
 
 include tests/Makefile
 
-qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
-
-qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
-$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, "  GEN   $@")
-qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\
-$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, "  GEN   $@")
-qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\
-$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, "  GEN   $@")
-
-qapi-types.c qapi-types.h :\
-$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, "  GEN   $@")
-qapi-visit.c qapi-visit.h :\
-$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "."  < $<, "  GEN   $@")
-qmp-commands.h qmp-marshal.c :\
-$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
-	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, "  GEN   $@")
-
 QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
 $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
 
diff --git a/Makefile.objs b/Makefile.objs
index 37be7e2..9da96ea 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -224,6 +224,28 @@ common-obj-y += qmp.o hmp.o
 
 universal-obj-y += $(qapi-obj-y)
 
+qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
+
+qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
+$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, "  GEN   $@")
+qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\
+$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, "  GEN   $@")
+qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\
+$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, "  GEN   $@")
+
+qapi-types.c qapi-types.h :\
+$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, "  GEN   $@")
+qapi-visit.c qapi-visit.h :\
+$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "."  < $<, "  GEN   $@")
+qmp-commands.h qmp-marshal.c :\
+$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
+	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, "  GEN   $@")
+
 ######################################################################
 # guest agent
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH V2 4/4] block export function path_has_protocol
  2012-11-16 13:31 [Qemu-devel] [PATCH V2 0/4] Buildsystem fix and block func export Wenchao Xia
                   ` (2 preceding siblings ...)
  2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 3/4] Buildsystem move qapi generation to Makefile.objs Wenchao Xia
@ 2012-11-16 13:31 ` Wenchao Xia
  3 siblings, 0 replies; 5+ messages in thread
From: Wenchao Xia @ 2012-11-16 13:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: kwolf, peter.maydell, aliguori, stefanha, blauwirbel, pbonzini,
	Wenchao Xia

  This function is needed in other module, so export it. There is
already some patch on mail-list try export it, If that patch was applied,
pls ignore this one.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 block.c |    2 +-
 block.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/block.c b/block.c
index da1fdca..ced9018 100644
--- a/block.c
+++ b/block.c
@@ -199,7 +199,7 @@ static void bdrv_io_limits_intercept(BlockDriverState *bs,
 }
 
 /* check if the path starts with "<protocol>:" */
-static int path_has_protocol(const char *path)
+int path_has_protocol(const char *path)
 {
     const char *p;
 
diff --git a/block.h b/block.h
index 722c620..6805245 100644
--- a/block.h
+++ b/block.h
@@ -428,6 +428,8 @@ typedef enum {
     BLKDBG_EVENT_MAX,
 } BlkDebugEvent;
 
+int path_has_protocol(const char *path);
+
 #define BLKDBG_EVENT(bs, evt) bdrv_debug_event(bs, evt)
 void bdrv_debug_event(BlockDriverState *bs, BlkDebugEvent event);
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-16 13:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-16 13:31 [Qemu-devel] [PATCH V2 0/4] Buildsystem fix and block func export Wenchao Xia
2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 1/4] Buildsystem fix distclean error for pixman Wenchao Xia
2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 2/4] Buildsystem clean tests directory clearly Wenchao Xia
2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 3/4] Buildsystem move qapi generation to Makefile.objs Wenchao Xia
2012-11-16 13:31 ` [Qemu-devel] [PATCH V2 4/4] block export function path_has_protocol 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).