diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-03-20 14:11:53 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-03-21 10:42:52 +0100 |
commit | 818c3318332a0b0ba5931d8d74d2260fb0328a71 (patch) | |
tree | 85effe6992d924c3cdb54be30a52df9145dc11f9 /tests | |
parent | 32b8a2ad618b20ff9eb3ac9ce0418a9239916571 (diff) |
tests/qapi-schema: Make test-qapi.py print docs again
test-qapi.py used to print the internal representation of doc comments
(commit 3313b61). This went away when we dropped the doc comments in
positive tests (commit 87c16dc). Bring it back, because I'm going to
add real positive doc comment tests.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1490015515-25851-5-git-send-email-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qapi-schema/test-qapi.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index ef74e2c4c8..c7724d3437 100644 --- a/tests/qapi-schema/test-qapi.py +++ b/tests/qapi-schema/test-qapi.py @@ -55,3 +55,14 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor): schema = QAPISchema(sys.argv[1]) schema.visit(QAPISchemaTestVisitor()) + +for doc in schema.docs: + if doc.symbol: + print 'doc symbol=%s' % doc.symbol + else: + print 'doc freeform' + print ' body=\n%s' % doc.body + for arg, section in doc.args.iteritems(): + print ' arg=%s\n%s' % (arg, section) + for section in doc.sections: + print ' section=%s\n%s' % (section.name, section) |