aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/test-qapi.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-03-05 19:23:45 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-03-05 19:23:45 +0000
commita3e3b0a7bd5de211a62cdf2d6c12b96d3c403560 (patch)
treeb6c5f9492569c8840f61633c02e4aa326dda0aa4 /tests/qapi-schema/test-qapi.py
parentc99b58326d92034a00003c4f2e019f662c3dbee5 (diff)
parent56a4689582433125d7042ba506a081e08dc264d4 (diff)
downloadqemu-a3e3b0a7bd5de211a62cdf2d6c12b96d3c403560.zip
qemu-a3e3b0a7bd5de211a62cdf2d6c12b96d3c403560.tar.gz
qemu-a3e3b0a7bd5de211a62cdf2d6c12b96d3c403560.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-03-05' into staging
QAPI patches for 2019-03-05 # gpg: Signature made Tue 05 Mar 2019 16:47:17 GMT # gpg: using RSA key 3870B400EB918653 # 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-2019-03-05: qapi: Fix array first used in a different module tests/qapi-schema: Cover forward reference to sub-module tests: Rename UserDefNativeListUnion to UserDefListUnion qapi: Fix code generation for sub-modules in other directories qapi: Pass file name to QAPIGen constructor instead of methods tests/qapi-schema: Cover conditional arrays tests/qapi-schema: Make test-qapi.py print arrays Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qapi-schema/test-qapi.py')
-rw-r--r--tests/qapi-schema/test-qapi.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index d592854..d21fca0 100644
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -32,6 +32,12 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
self._print_if(m.ifcond, indent=8)
self._print_if(ifcond)
+ def visit_array_type(self, name, info, ifcond, element_type):
+ if not info:
+ return # suppress built-in arrays
+ print('array %s %s' % (name, element_type.name))
+ self._print_if(ifcond)
+
def visit_object_type(self, name, info, ifcond, base, members, variants):
print('object %s' % name)
if base: