提交 818c3318 编写于 作者: M Markus Armbruster

tests/qapi-schema: Make test-qapi.py print docs again

test-qapi.py used to print the internal representation of doc comments
(commit 3313b612).  This went away when we dropped the doc comments in
positive tests (commit 87c16dce).  Bring it back, because I'm going to
add real positive doc comment tests.
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Message-Id: <1490015515-25851-5-git-send-email-armbru@redhat.com>
Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
上级 32b8a2ad
......@@ -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)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册