aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/test-qapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/test-qapi.py')
-rw-r--r--tests/qapi-schema/test-qapi.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index ef74e2c4c8..b4cde4ff4f 100644
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -55,3 +55,17 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
schema = QAPISchema(sys.argv[1])
schema.visit(QAPISchemaTestVisitor())
+
+for doc in schema.docs:
+ if doc.symbol:
+ print 'doc symbol=%s expr=%s' % \
+ (doc.symbol, doc.expr.items()[0])
+ else:
+ print 'doc freeform'
+ 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)
+ body = str(doc.body)
+ if body:
+ print ' body=\n%s' % body