w32: Support tests (make check)
PATCH v2 1/1 w32: Support tests (make check)
Adding $(EXESUF) is needed to make those tests work on w32 hosts, too.
v2:
Rebased, added new tests, tests sorted alphabetically.
--- tests/Makefile | 38 +++++++++++++++++++++++--------------- 1 files changed, 23 insertions(+), 15 deletions(-)
tests/Makefile +23 -15
@@ -1,16 +1,24 @@ -CHECKS = check-qdict check-qfloat check-qint check-qstring check-qlist -CHECKS += check-qjson test-qmp-output-visitor test-qmp-input-visitor -CHECKS += test-string-input-visitor test-string-output-visitor test-coroutine +CHECKS = check-qdict$(EXESUF) +CHECKS += check-qfloat$(EXESUF) +CHECKS += check-qint$(EXESUF) +CHECKS += check-qjson$(EXESUF) +CHECKS += check-qlist$(EXESUF) +CHECKS += check-qstring$(EXESUF) +CHECKS += test-coroutine$(EXESUF) +CHECKS += test-qmp-input-visitor$(EXESUF) +CHECKS += test-qmp-output-visitor$(EXESUF) +CHECKS += test-string-input-visitor$(EXESUF) +CHECKS += test-string-output-visitor$(EXESUF) check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS) -check-qint: check-qint.o qint.o $(tools-obj-y) -check-qstring: check-qstring.o qstring.o $(tools-obj-y) -check-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y) -check-qlist: check-qlist.o qlist.o qint.o $(tools-obj-y) -check-qfloat: check-qfloat.o qfloat.o $(tools-obj-y) -check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y) -test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y) +check-qint$(EXESUF): check-qint.o qint.o $(tools-obj-y) +check-qstring$(EXESUF): check-qstring.o qstring.o $(tools-obj-y) +check-qdict$(EXESUF): check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y) +check-qlist$(EXESUF): check-qlist.o qlist.o qint.o $(tools-obj-y) +check-qfloat$(EXESUF): check-qfloat.o qfloat.o $(tools-obj-y) +check-qjson$(EXESUF): check-qjson.o $(qobject-obj-y) $(tools-obj-y) +test-coroutine$(EXESUF): test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y) test-qmp-input-visitor.o test-qmp-output-visitor.o \ test-string-input-visitor.o test-string-output-visitor.o \
@@ -28,19 +36,19 @@ $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py test-string-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) -test-string-output-visitor: test-string-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o +test-string-output-visitor$(EXESUF): test-string-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-string-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) -test-string-input-visitor: test-string-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o +test-string-input-visitor$(EXESUF): test-string-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-qmp-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) -test-qmp-output-visitor: test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o +test-qmp-output-visitor$(EXESUF): test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-qmp-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) -test-qmp-input-visitor: test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o +test-qmp-input-visitor$(EXESUF): test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y) -test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o +test-qmp-commands$(EXESUF): test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o .PHONY: check check: $(CHECKS)
Signature · 1 line
1.7.9
Am 22.02.2012 20:48, schrieb Stefan Weil:
Quoted 19 lines
Adding $(EXESUF) is needed to make those tests work on w32 hosts, too.
v2:
Rebased, added new tests, tests sorted alphabetically.Signed-off-by Stefan Weil <[email protected]>--- tests/Makefile | 38 +++++++++++++++++++++++--------------- 1 files changed, 23 insertions(+), 15 deletions(-)tests/Makefile +1
-3@@ -1,16 +1,24 @@ -CHECKS = check-qdict check-qfloat check-qint check-qstring check-qlist -CHECKS += check-qjson test-qmp-output-visitor test-qmp-input-visitor -CHECKS += test-string-input-visitor test-string-output-visitor test-coroutine +CHECKS = check-qdict$(EXESUF)
tests/Makefile line 11
Quoted 10 lines
tests/Makefile +10
-0+CHECKS += check-qfloat$(EXESUF) +CHECKS += check-qint$(EXESUF) +CHECKS += check-qjson$(EXESUF) +CHECKS += check-qlist$(EXESUF) +CHECKS += check-qstring$(EXESUF) +CHECKS += test-coroutine$(EXESUF) +CHECKS += test-qmp-input-visitor$(EXESUF) +CHECKS += test-qmp-output-visitor$(EXESUF) +CHECKS += test-string-input-visitor$(EXESUF) +CHECKS += test-string-output-visitor$(EXESUF)
Cute. (one-per-line allows to easily comment individual ones out)
Some lines below were already way over 80 chars, so
Andreas
Quoted 45 lines
tests/Makefile +12
-12check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS) -check-qint: check-qint.o qint.o $(tools-obj-y) -check-qstring: check-qstring.o qstring.o $(tools-obj-y) -check-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y) -check-qlist: check-qlist.o qlist.o qint.o $(tools-obj-y) -check-qfloat: check-qfloat.o qfloat.o $(tools-obj-y) -check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y) -test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y) +check-qint$(EXESUF): check-qint.o qint.o $(tools-obj-y) +check-qstring$(EXESUF): check-qstring.o qstring.o $(tools-obj-y) +check-qdict$(EXESUF): check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y) +check-qlist$(EXESUF): check-qlist.o qlist.o qint.o $(tools-obj-y) +check-qfloat$(EXESUF): check-qfloat.o qfloat.o $(tools-obj-y) +check-qjson$(EXESUF): check-qjson.o $(qobject-obj-y) $(tools-obj-y) +test-coroutine$(EXESUF): test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y) test-qmp-input-visitor.o test-qmp-output-visitor.o \ test-string-input-visitor.o test-string-output-visitor.o \@@ -28,19 +36,19 @@ $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py test-string-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) -test-string-output-visitor: test-string-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o +test-string-output-visitor$(EXESUF): test-string-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-string-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) -test-string-input-visitor: test-string-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o +test-string-input-visitor$(EXESUF): test-string-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-qmp-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) -test-qmp-output-visitor: test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o +test-qmp-output-visitor$(EXESUF): test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-qmp-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y) -test-qmp-input-visitor: test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o +test-qmp-input-visitor$(EXESUF): test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y) -test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o +test-qmp-commands$(EXESUF): test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o .PHONY: check check: $(CHECKS)
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Am 25.02.2012 17:31, schrieb Andreas Färber:
Quoted 34 lines
Am 22.02.2012 20:48, schrieb Stefan Weil:
Quoted 20 lines
Adding $(EXESUF) is needed to make those tests work on w32 hosts, too.
v2:
Rebased, added new tests, tests sorted alphabetically.Signed-off-by Stefan Weil <[email protected]>---
tests/Makefile | 38 +++++++++++++++++++++++---------------1 files changed, 23 insertions(+), 15 deletions(-)tests/Makefile +0
-3@@ -1,16 +1,24 @@ -CHECKS = check-qdict check-qfloat check-qint check-qstring check-qlist -CHECKS += check-qjson test-qmp-output-visitor test-qmp-input-visitor -CHECKS += test-string-input-visitor test-string-output-visitortest-coroutine
tests/Makefile +1
-0+CHECKS = check-qdict$(EXESUF)tests/Makefile line 11
Quoted 10 lines
tests/Makefile +10
-0+CHECKS += check-qfloat$(EXESUF) +CHECKS += check-qint$(EXESUF) +CHECKS += check-qjson$(EXESUF) +CHECKS += check-qlist$(EXESUF) +CHECKS += check-qstring$(EXESUF) +CHECKS += test-coroutine$(EXESUF) +CHECKS += test-qmp-input-visitor$(EXESUF) +CHECKS += test-qmp-output-visitor$(EXESUF) +CHECKS += test-string-input-visitor$(EXESUF) +CHECKS += test-string-output-visitor$(EXESUF)Cute. (one-per-line allows to easily comment individual ones out)
Quoted 5 lines
Some lines below were already way over 80 chars, so
Reviewed-by Andreas Färber <[email protected]>Andreas
And as long as they remain sorted, they also reduce the risk of merge conflicts:
When everybody just adds to the end,two different commits will always conflict.
They won't conflictif both commits add new lines at different locations.
Regards,
Stefan
Am 25.02.2012 17:39, schrieb Stefan Weil:
Quoted 41 lines
Am 25.02.2012 17:31, schrieb Andreas Färber:
Quoted 34 lines
Am 22.02.2012 20:48, schrieb Stefan Weil:
Quoted 20 lines
Adding $(EXESUF) is needed to make those tests work on w32 hosts, too.
v2:
Rebased, added new tests, tests sorted alphabetically.Signed-off-by Stefan Weil <[email protected]>---
tests/Makefile | 38 +++++++++++++++++++++++---------------1 files changed, 23 insertions(+), 15 deletions(-)tests/Makefile +0
-3@@ -1,16 +1,24 @@ -CHECKS = check-qdict check-qfloat check-qint check-qstring check-qlist -CHECKS += check-qjson test-qmp-output-visitor test-qmp-input-visitor -CHECKS += test-string-input-visitor test-string-output-visitortest-coroutine
tests/Makefile +1
-0+CHECKS = check-qdict$(EXESUF)tests/Makefile line 11
Quoted 10 lines
tests/Makefile +10
-0+CHECKS += check-qfloat$(EXESUF) +CHECKS += check-qint$(EXESUF) +CHECKS += check-qjson$(EXESUF) +CHECKS += check-qlist$(EXESUF) +CHECKS += check-qstring$(EXESUF) +CHECKS += test-coroutine$(EXESUF) +CHECKS += test-qmp-input-visitor$(EXESUF) +CHECKS += test-qmp-output-visitor$(EXESUF) +CHECKS += test-string-input-visitor$(EXESUF) +CHECKS += test-string-output-visitor$(EXESUF)Cute. (one-per-line allows to easily comment individual ones out)
Quoted 5 lines
Some lines below were already way over 80 chars, so
Reviewed-by Andreas Färber <[email protected]>Andreas
Quoted 8 lines
And as long as they remain sorted, they also reduce the risk of merge conflicts:
When everybody just adds to the end,two different commits will always conflict.
They won't conflictif both commits add new lines at different locations.
I'd rather not strictly keep it in alphabetical order since having one test pass might be a prerequisite for another test to be meaningful (e.g., qfloat before pi). IMO we should have groups of tests, in which we can order them alphabetically.
Anyway, my line of thinking was that no such interdependency is documented here so it should be permissible to rearrange the order now. The q* and the visitors are still together, input before output, so I like it. We could add lines before test-coroutine and test-qmp-input-visitors to group them by topic if we wanted, but the list is still small, so no real need.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg