qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.9 4/6] tests/qapi-schema: Make test-qapi.p


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH for-2.9 4/6] tests/qapi-schema: Make test-qapi.py print docs again
Date: Mon, 20 Mar 2017 09:27:20 -0400 (EDT)


----- Original Message -----
> 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.

Yup, as I pointed out in the previous series, but since you biring it back 
modified:


> 
> Signed-off-by: Markus Armbruster <address@hidden>

Reviewed-by: Marc-André Lureau <address@hidden>

> ---
>  tests/qapi-schema/test-qapi.py | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
> index ef74e2c..c7724d3 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)
> --
> 2.7.4
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]