diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-03-01 16:40:45 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-03-05 14:41:01 +0100 |
commit | ca0ac758d6fad30676ded90d3975f282d57a4435 (patch) | |
tree | 42767690d3c0a02dda7ce98bc2770d8aedd35ee0 /tests/qapi-schema/test-qapi.py | |
parent | 0984a157c1c053394adbf64ed7de97f1aebe6a2d (diff) |
tests/qapi-schema: Make test-qapi.py print arrays
The next few commits mess with array types, and having the changes
exposed in output of test-qapi.py will be useful.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190301154051.23317-2-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Rationale added to commit message]
Diffstat (limited to 'tests/qapi-schema/test-qapi.py')
-rw-r--r-- | tests/qapi-schema/test-qapi.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index d592854601..d21fca01fc 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: |