diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-01-14 16:42:27 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-01-14 16:42:27 +0000 |
commit | e021e6fe5294939f286021b3f870666ccb979aa2 (patch) | |
tree | 606b0534cb354f1b82017d408b41c2ac2555f320 /tests | |
parent | 3a63b24a1bbf166e6f455fe43a6bbd8dea413d92 (diff) | |
parent | 3bef3aaec91815b75a78a4c12ca92ac3cec53faf (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-01-14' into staging
QAPI patches for 2020-01-14
# gpg: Signature made Tue 14 Jan 2020 10:15:22 GMT
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-qapi-2020-01-14:
qapi: Simplify QAPISchemaModularCVisitor
qapi: Fix code generation for empty modules
qapi: Proper intermediate representation for modules
qapi: Generate command registration stuff into separate files
tests/Makefile.include: Fix missing test-qapi-emit-events.[ch]
qapi: Tweak "command returns a nice type" check for clarity
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/.gitignore | 1 | ||||
-rw-r--r-- | tests/Makefile.include | 9 | ||||
-rw-r--r-- | tests/qapi-schema/empty.out | 1 | ||||
-rw-r--r-- | tests/qapi-schema/include-repetition.out | 6 | ||||
-rw-r--r-- | tests/qapi-schema/qapi-schema-test.out | 24 | ||||
-rw-r--r-- | tests/test-qmp-cmds.c | 1 |
6 files changed, 22 insertions, 20 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index f9c0170881..7306866f21 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -12,6 +12,7 @@ test-* !test-*.c !docker/test-* test-qapi-commands.[ch] +test-qapi-init-commands.[ch] include/test-qapi-commands-sub-module.[ch] test-qapi-commands-sub-sub-module.[ch] test-qapi-emit-events.[ch] diff --git a/tests/Makefile.include b/tests/Makefile.include index 1ae14a8b15..c6827ce8c2 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -350,8 +350,10 @@ generated-files-y += tests/test-qapi-visit.h generated-files-y += tests/include/test-qapi-visit-sub-module.h generated-files-y += tests/test-qapi-visit-sub-sub-module.h generated-files-y += tests/test-qapi-commands.h +generated-files-y += tests/test-qapi-init-commands.h generated-files-y += tests/include/test-qapi-commands-sub-module.h generated-files-y += tests/test-qapi-commands-sub-sub-module.h +generated-files-y += tests/test-qapi-emit-events.h generated-files-y += tests/test-qapi-events.h generated-files-y += tests/include/test-qapi-events-sub-module.h generated-files-y += tests/test-qapi-events-sub-sub-module.h @@ -465,7 +467,10 @@ tests/include/test-qapi-commands-sub-module.h \ tests/include/test-qapi-commands-sub-module.c \ tests/test-qapi-commands-sub-sub-module.h \ tests/test-qapi-commands-sub-sub-module.c \ +tests/test-qapi-emit-events.c tests/test-qapi-emit-events.h \ tests/test-qapi-events.c tests/test-qapi-events.h \ +tests/test-qapi-init-commands.c \ +tests/test-qapi-init-commands.h \ tests/include/test-qapi-events-sub-module.c \ tests/include/test-qapi-events-sub-module.h \ tests/test-qapi-events-sub-sub-module.c \ @@ -505,11 +510,11 @@ tests/qtest/dbus-vmstate-test.o: tests/qtest/dbus-vmstate1.h tests/test-string-output-visitor$(EXESUF): tests/test-string-output-visitor.o $(test-qapi-obj-y) tests/test-string-input-visitor$(EXESUF): tests/test-string-input-visitor.o $(test-qapi-obj-y) -tests/test-qmp-event$(EXESUF): tests/test-qmp-event.o $(test-qapi-obj-y) tests/test-qapi-events.o +tests/test-qmp-event$(EXESUF): tests/test-qmp-event.o $(test-qapi-obj-y) tests/test-qapi-emit-events.o tests/test-qapi-events.o tests/test-qobject-output-visitor$(EXESUF): tests/test-qobject-output-visitor.o $(test-qapi-obj-y) tests/test-clone-visitor$(EXESUF): tests/test-clone-visitor.o $(test-qapi-obj-y) tests/test-qobject-input-visitor$(EXESUF): tests/test-qobject-input-visitor.o $(test-qapi-obj-y) -tests/test-qmp-cmds$(EXESUF): tests/test-qmp-cmds.o tests/test-qapi-commands.o $(test-qapi-obj-y) +tests/test-qmp-cmds$(EXESUF): tests/test-qmp-cmds.o tests/test-qapi-commands.o tests/test-qapi-init-commands.o $(test-qapi-obj-y) tests/test-visitor-serialization$(EXESUF): tests/test-visitor-serialization.o $(test-qapi-obj-y) tests/test-opts-visitor$(EXESUF): tests/test-opts-visitor.o $(test-qapi-obj-y) diff --git a/tests/qapi-schema/empty.out b/tests/qapi-schema/empty.out index 5b53d00702..69666c39ad 100644 --- a/tests/qapi-schema/empty.out +++ b/tests/qapi-schema/empty.out @@ -9,3 +9,4 @@ enum QType member qdict member qlist member qbool +module empty.json diff --git a/tests/qapi-schema/include-repetition.out b/tests/qapi-schema/include-repetition.out index 5423983239..0b654ddebb 100644 --- a/tests/qapi-schema/include-repetition.out +++ b/tests/qapi-schema/include-repetition.out @@ -11,15 +11,13 @@ enum QType member qbool module include-repetition.json include comments.json +include include-repetition-sub.json +include comments.json module comments.json enum Status member good member bad member ugly -module include-repetition.json -include include-repetition-sub.json module include-repetition-sub.json include comments.json include comments.json -module include-repetition.json -include comments.json diff --git a/tests/qapi-schema/qapi-schema-test.out b/tests/qapi-schema/qapi-schema-test.out index 3660e75a48..9bd3c4a490 100644 --- a/tests/qapi-schema/qapi-schema-test.out +++ b/tests/qapi-schema/qapi-schema-test.out @@ -153,9 +153,6 @@ object q_obj_sizeList-wrapper member data: sizeList optional=False object q_obj_anyList-wrapper member data: anyList optional=False -module sub-sub-module.json -array StatusList Status -module qapi-schema-test.json object q_obj_StatusList-wrapper member data: StatusList optional=False enum UserDefListUnionKind @@ -193,17 +190,6 @@ object UserDefListUnion case any: q_obj_anyList-wrapper case user: q_obj_StatusList-wrapper include include/sub-module.json -module include/sub-module.json -include sub-sub-module.json -module sub-sub-module.json -enum Status - member good - member bad - member ugly -module include/sub-module.json -object SecondArrayRef - member s: StatusList optional=False -module qapi-schema-test.json command user_def_cmd None -> None gen=True success_response=True boxed=False oob=False preconfig=False object q_obj_user_def_cmd1-arg @@ -435,3 +421,13 @@ command test-command-cond-features3 None -> None gen=True success_response=True boxed=False oob=False preconfig=False feature feature1 if ['defined(TEST_IF_COND_1)', 'defined(TEST_IF_COND_2)'] +module include/sub-module.json +include sub-sub-module.json +object SecondArrayRef + member s: StatusList optional=False +module sub-sub-module.json +array StatusList Status +enum Status + member good + member bad + member ugly diff --git a/tests/test-qmp-cmds.c b/tests/test-qmp-cmds.c index 27b0afe55a..79507d9e54 100644 --- a/tests/test-qmp-cmds.c +++ b/tests/test-qmp-cmds.c @@ -7,6 +7,7 @@ #include "tests/test-qapi-types.h" #include "tests/test-qapi-visit.h" #include "test-qapi-commands.h" +#include "test-qapi-init-commands.h" static QmpCommandList qmp_commands; |