From 2b8419cb4911731db6c883fa7b0428ad4a355d9d Mon Sep 17 00:00:00 2001 From: Michael Roth Date: Thu, 18 Sep 2014 17:59:33 -0500 Subject: tests: avoid running duplicate qom-tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 3687d532 we've been unconditionally adding qom-test to our qtests for every arch. However, some archs inherit their tests from Makefile variables for other archs, such as i386/x86_64, microblaze/microblazeel, and xtensa/xtensaeb. Since these are evaluated in a lazy manner, we ultimately end up adding qom-test twice. In the case x86_64, where we have a large number of machine types that we rerun qom-test for, this has lead to a fairly noticeable increase in the overall run-time of `make check` (78s vs. 42s on my machine). Similar speed-ups are visible for other such archs, but not nearly as significant. Fix this by only adding qom-test to an arch's test list if it's not already present. Signed-off-by: Michael Roth Reviewed-by: Peter Maydell Reviewed-by: Andreas Färber Cc: qemu-stable@nongnu.org Signed-off-by: Michael Tokarev --- tests/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index f5de29c..e8bdd1a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -193,7 +193,8 @@ check-qtest-xtensaeb-y = $(check-qtest-xtensa-y) # qom-test works for all sysemu architectures: $(foreach target,$(SYSEMU_TARGET_LIST), \ - $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF))) + $(if $(findstring tests/qom-test$(EXESUF), $(check-qtest-$(target)-y)),, \ + $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF)))) check-qapi-schema-y := $(addprefix tests/qapi-schema/, \ comments.json empty.json funny-char.json indented-expr.json \ -- cgit v1.1 From 04404c21cc973e37ca33c4a8443eaf7578cc2246 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 26 Sep 2014 09:20:31 -0600 Subject: qapi: Consistent whitespace in tests/Makefile tests/Makefile had a mix of TAB vs. 8-space indentation; given that it is a Makefile, TAB is more idiomatic even though in these particular cases the choice of whitespace didn't matter. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- tests/Makefile | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index e8bdd1a..834279c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -197,23 +197,23 @@ $(foreach target,$(SYSEMU_TARGET_LIST), \ $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF)))) check-qapi-schema-y := $(addprefix tests/qapi-schema/, \ - comments.json empty.json funny-char.json indented-expr.json \ - missing-colon.json missing-comma-list.json \ - missing-comma-object.json non-objects.json \ - qapi-schema-test.json quoted-structural-chars.json \ - trailing-comma-list.json trailing-comma-object.json \ - unclosed-list.json unclosed-object.json unclosed-string.json \ - duplicate-key.json union-invalid-base.json flat-union-no-base.json \ - flat-union-invalid-discriminator.json \ - flat-union-invalid-branch-key.json flat-union-reverse-define.json \ - flat-union-string-discriminator.json \ - include-simple.json include-relpath.json include-format-err.json \ - include-non-file.json include-no-file.json include-before-err.json \ - include-nested-err.json include-self-cycle.json include-cycle.json \ - include-repetition.json event-nest-struct.json) + comments.json empty.json funny-char.json indented-expr.json \ + missing-colon.json missing-comma-list.json \ + missing-comma-object.json non-objects.json \ + qapi-schema-test.json quoted-structural-chars.json \ + trailing-comma-list.json trailing-comma-object.json \ + unclosed-list.json unclosed-object.json unclosed-string.json \ + duplicate-key.json union-invalid-base.json flat-union-no-base.json \ + flat-union-invalid-discriminator.json \ + flat-union-invalid-branch-key.json flat-union-reverse-define.json \ + flat-union-string-discriminator.json \ + include-simple.json include-relpath.json include-format-err.json \ + include-non-file.json include-no-file.json include-before-err.json \ + include-nested-err.json include-self-cycle.json include-cycle.json \ + include-repetition.json event-nest-struct.json) GENERATED_HEADERS += tests/test-qapi-types.h tests/test-qapi-visit.h \ - tests/test-qmp-commands.h tests/test-qapi-event.h + tests/test-qmp-commands.h tests/test-qapi-event.h test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \ tests/check-qlist.o tests/check-qfloat.o tests/check-qjson.o \ @@ -225,7 +225,7 @@ test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \ tests/test-opts-visitor.o tests/test-qmp-event.o test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \ - tests/test-qapi-event.o + tests/test-qapi-event.o $(test-obj-y): QEMU_INCLUDES += -Itests QEMU_CFLAGS += -I$(SRC_PATH)/tests -- cgit v1.1 From 597db727cc9dfeace19faed49014dbcda8a1a8fd Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 26 Sep 2014 09:20:32 -0600 Subject: qapi: Ignore files created during make check After an in-tree build and run of 'make check-{qapi-schema,unit}', I noticed some leftover files. Signed-off-by: Eric Blake Reviewed-by: Wenchao Xia Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- tests/.gitignore | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/.gitignore b/tests/.gitignore index c71c110..e2e4957 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -14,11 +14,14 @@ test-int128 test-iov test-mul64 test-opts-visitor +test-qapi-event.[ch] test-qapi-types.[ch] test-qapi-visit.[ch] test-qdev-global-props +test-qemu-opts test-qmp-commands test-qmp-commands.h +test-qmp-event test-qmp-input-strict test-qmp-input-visitor test-qmp-marshal.c -- cgit v1.1