diff options
author | Markus Armbruster <armbru@redhat.com> | 2020-03-17 12:54:45 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-03-17 21:25:47 +0100 |
commit | 84ab00868798a65e19d76d3cb5f1552c6b25ceb4 (patch) | |
tree | a8bd528f121db13e9b333da39091db2ca07cc4e7 /tests/qapi-schema/test-qapi.py | |
parent | 645178c0697fb0a7805c090745de9925d935cd1b (diff) |
qapi: Add feature flags to struct members
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200317115459.31821-21-armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/test-qapi.py')
-rwxr-xr-x | tests/qapi-schema/test-qapi.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index 8e09e54edb..f396b471eb 100755 --- a/tests/qapi-schema/test-qapi.py +++ b/tests/qapi-schema/test-qapi.py @@ -55,6 +55,7 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor): print(' member %s: %s optional=%s' % (m.name, m.type.name, m.optional)) self._print_if(m.ifcond, 8) + self._print_features(m.features, indent=8) self._print_variants(variants) self._print_if(ifcond) self._print_features(features) @@ -96,11 +97,11 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor): print('%sif %s' % (' ' * indent, ifcond)) @classmethod - def _print_features(cls, features): + def _print_features(cls, features, indent=4): if features: for f in features: - print(' feature %s' % f.name) - cls._print_if(f.ifcond, 8) + print('%sfeature %s' % (' ' * indent, f.name)) + cls._print_if(f.ifcond, indent + 4) def test_frontend(fname): |