On 09/03/2015 08:29 AM, Markus Armbruster wrote: > The old code prints the result of parsing (list of expression > dictionaries), and partial results of semantic analysis (list of enum > dictionaries, list of struct dictionaries). > > The new code prints a trace of a schema visit, i.e. what the back-ends > are going to use. Built-in and array types are omitted, because > they're boring. > > Signed-off-by: Markus Armbruster <arm...@redhat.com> > Reviewed-by: Eric Blake <ebl...@redhat.com> > ---
> +++ b/tests/qapi-schema/test-qapi.py > @@ -15,11 +15,35 @@ from pprint import pprint > import os > import sys > > -try: > - exprs = QAPISchema(sys.argv[1]).get_exprs() > -except SystemExit: > - raise Don't we still need a try wrapped around... > +schema = QAPISchema(sys.argv[1]) > +schema.visit(QAPISchemaTestVisitor()) ...this, to guarantee non-zero exit status if an exception caused by refactoring breaks the pretty-printing? (It happened to me when I tried to rename to _tag_name, and my only indication that something was wrong was that qapi-tests/qapi-schema-test.out was truncated due to this script aborting early after trying to access the old spelling tag_name). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature