tests/qapi-schema: Tidy up test output indentation
Command and event details are indented three spaces, everything else
four. Messed up in commit 156402e504
. Use four spaces consistently.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Message-Id: <20191018081454.21369-2-armbru@redhat.com>
This commit is contained in:
parent
02ac641a4d
commit
758f272b6d
|
@ -46,9 +46,9 @@ object q_obj_cmd-arg
|
||||||
member arg2: str optional=True
|
member arg2: str optional=True
|
||||||
member arg3: bool optional=False
|
member arg3: bool optional=False
|
||||||
command cmd q_obj_cmd-arg -> Object
|
command cmd q_obj_cmd-arg -> Object
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
command cmd-boxed Object -> None
|
command cmd-boxed Object -> None
|
||||||
gen=True success_response=True boxed=True oob=False preconfig=False
|
gen=True success_response=True boxed=True oob=False preconfig=False
|
||||||
doc freeform
|
doc freeform
|
||||||
body=
|
body=
|
||||||
= Section
|
= Section
|
||||||
|
|
|
@ -11,4 +11,4 @@ enum QType
|
||||||
member qbool
|
member qbool
|
||||||
module event-case.json
|
module event-case.json
|
||||||
event oops None
|
event oops None
|
||||||
boxed=False
|
boxed=False
|
||||||
|
|
|
@ -11,6 +11,6 @@ enum QType
|
||||||
member qbool
|
member qbool
|
||||||
module indented-expr.json
|
module indented-expr.json
|
||||||
command eins None -> None
|
command eins None -> None
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
command zwei None -> None
|
command zwei None -> None
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
|
|
|
@ -33,7 +33,7 @@ object Union
|
||||||
case value3: q_empty
|
case value3: q_empty
|
||||||
case value4: q_empty
|
case value4: q_empty
|
||||||
command user_def_cmd0 Empty2 -> Empty2
|
command user_def_cmd0 Empty2 -> Empty2
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
enum QEnumTwo
|
enum QEnumTwo
|
||||||
prefix QENUM_TWO
|
prefix QENUM_TWO
|
||||||
member value1
|
member value1
|
||||||
|
@ -205,35 +205,35 @@ object SecondArrayRef
|
||||||
member s: StatusList optional=False
|
member s: StatusList optional=False
|
||||||
module qapi-schema-test.json
|
module qapi-schema-test.json
|
||||||
command user_def_cmd None -> None
|
command user_def_cmd None -> None
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
object q_obj_user_def_cmd1-arg
|
object q_obj_user_def_cmd1-arg
|
||||||
member ud1a: UserDefOne optional=False
|
member ud1a: UserDefOne optional=False
|
||||||
command user_def_cmd1 q_obj_user_def_cmd1-arg -> None
|
command user_def_cmd1 q_obj_user_def_cmd1-arg -> None
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
object q_obj_user_def_cmd2-arg
|
object q_obj_user_def_cmd2-arg
|
||||||
member ud1a: UserDefOne optional=False
|
member ud1a: UserDefOne optional=False
|
||||||
member ud1b: UserDefOne optional=True
|
member ud1b: UserDefOne optional=True
|
||||||
command user_def_cmd2 q_obj_user_def_cmd2-arg -> UserDefTwo
|
command user_def_cmd2 q_obj_user_def_cmd2-arg -> UserDefTwo
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
command cmd-success-response None -> None
|
command cmd-success-response None -> None
|
||||||
gen=True success_response=False boxed=False oob=False preconfig=False
|
gen=True success_response=False boxed=False oob=False preconfig=False
|
||||||
object q_obj_guest-get-time-arg
|
object q_obj_guest-get-time-arg
|
||||||
member a: int optional=False
|
member a: int optional=False
|
||||||
member b: int optional=True
|
member b: int optional=True
|
||||||
command guest-get-time q_obj_guest-get-time-arg -> int
|
command guest-get-time q_obj_guest-get-time-arg -> int
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
object q_obj_guest-sync-arg
|
object q_obj_guest-sync-arg
|
||||||
member arg: any optional=False
|
member arg: any optional=False
|
||||||
command guest-sync q_obj_guest-sync-arg -> any
|
command guest-sync q_obj_guest-sync-arg -> any
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
command boxed-struct UserDefZero -> None
|
command boxed-struct UserDefZero -> None
|
||||||
gen=True success_response=True boxed=True oob=False preconfig=False
|
gen=True success_response=True boxed=True oob=False preconfig=False
|
||||||
command boxed-union UserDefListUnion -> None
|
command boxed-union UserDefListUnion -> None
|
||||||
gen=True success_response=True boxed=True oob=False preconfig=False
|
gen=True success_response=True boxed=True oob=False preconfig=False
|
||||||
command boxed-empty Empty1 -> None
|
command boxed-empty Empty1 -> None
|
||||||
gen=True success_response=True boxed=True oob=False preconfig=False
|
gen=True success_response=True boxed=True oob=False preconfig=False
|
||||||
command test-flags-command None -> None
|
command test-flags-command None -> None
|
||||||
gen=True success_response=True boxed=False oob=True preconfig=True
|
gen=True success_response=True boxed=False oob=True preconfig=True
|
||||||
object UserDefOptions
|
object UserDefOptions
|
||||||
member i64: intList optional=True
|
member i64: intList optional=True
|
||||||
member u64: uint64List optional=True
|
member u64: uint64List optional=True
|
||||||
|
@ -245,28 +245,28 @@ object EventStructOne
|
||||||
member string: str optional=False
|
member string: str optional=False
|
||||||
member enum2: EnumOne optional=True
|
member enum2: EnumOne optional=True
|
||||||
event EVENT_A None
|
event EVENT_A None
|
||||||
boxed=False
|
boxed=False
|
||||||
event EVENT_B None
|
event EVENT_B None
|
||||||
boxed=False
|
boxed=False
|
||||||
object q_obj_EVENT_C-arg
|
object q_obj_EVENT_C-arg
|
||||||
member a: int optional=True
|
member a: int optional=True
|
||||||
member b: UserDefOne optional=True
|
member b: UserDefOne optional=True
|
||||||
member c: str optional=False
|
member c: str optional=False
|
||||||
event EVENT_C q_obj_EVENT_C-arg
|
event EVENT_C q_obj_EVENT_C-arg
|
||||||
boxed=False
|
boxed=False
|
||||||
object q_obj_EVENT_D-arg
|
object q_obj_EVENT_D-arg
|
||||||
member a: EventStructOne optional=False
|
member a: EventStructOne optional=False
|
||||||
member b: str optional=False
|
member b: str optional=False
|
||||||
member c: str optional=True
|
member c: str optional=True
|
||||||
member enum3: EnumOne optional=True
|
member enum3: EnumOne optional=True
|
||||||
event EVENT_D q_obj_EVENT_D-arg
|
event EVENT_D q_obj_EVENT_D-arg
|
||||||
boxed=False
|
boxed=False
|
||||||
event EVENT_E UserDefZero
|
event EVENT_E UserDefZero
|
||||||
boxed=True
|
boxed=True
|
||||||
event EVENT_F UserDefFlatUnion
|
event EVENT_F UserDefFlatUnion
|
||||||
boxed=True
|
boxed=True
|
||||||
event EVENT_G Empty1
|
event EVENT_G Empty1
|
||||||
boxed=True
|
boxed=True
|
||||||
enum __org.qemu_x-Enum
|
enum __org.qemu_x-Enum
|
||||||
member __org.qemu_x-value
|
member __org.qemu_x-value
|
||||||
object __org.qemu_x-Base
|
object __org.qemu_x-Base
|
||||||
|
@ -297,7 +297,7 @@ alternate __org.qemu_x-Alt
|
||||||
tag type
|
tag type
|
||||||
case __org.qemu_x-branch: __org.qemu_x-Base
|
case __org.qemu_x-branch: __org.qemu_x-Base
|
||||||
event __ORG.QEMU_X-EVENT __org.qemu_x-Struct
|
event __ORG.QEMU_X-EVENT __org.qemu_x-Struct
|
||||||
boxed=False
|
boxed=False
|
||||||
array __org.qemu_x-EnumList __org.qemu_x-Enum
|
array __org.qemu_x-EnumList __org.qemu_x-Enum
|
||||||
array __org.qemu_x-StructList __org.qemu_x-Struct
|
array __org.qemu_x-StructList __org.qemu_x-Struct
|
||||||
object q_obj___org.qemu_x-command-arg
|
object q_obj___org.qemu_x-command-arg
|
||||||
|
@ -306,7 +306,7 @@ object q_obj___org.qemu_x-command-arg
|
||||||
member c: __org.qemu_x-Union2 optional=False
|
member c: __org.qemu_x-Union2 optional=False
|
||||||
member d: __org.qemu_x-Alt optional=False
|
member d: __org.qemu_x-Alt optional=False
|
||||||
command __org.qemu_x-command q_obj___org.qemu_x-command-arg -> __org.qemu_x-Union1
|
command __org.qemu_x-command q_obj___org.qemu_x-command-arg -> __org.qemu_x-Union1
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
object TestIfStruct
|
object TestIfStruct
|
||||||
member foo: int optional=False
|
member foo: int optional=False
|
||||||
member bar: int optional=False
|
member bar: int optional=False
|
||||||
|
@ -335,7 +335,7 @@ object q_obj_TestIfUnionCmd-arg
|
||||||
member union_cmd_arg: TestIfUnion optional=False
|
member union_cmd_arg: TestIfUnion optional=False
|
||||||
if ['defined(TEST_IF_UNION)']
|
if ['defined(TEST_IF_UNION)']
|
||||||
command TestIfUnionCmd q_obj_TestIfUnionCmd-arg -> None
|
command TestIfUnionCmd q_obj_TestIfUnionCmd-arg -> None
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
if ['defined(TEST_IF_UNION)']
|
if ['defined(TEST_IF_UNION)']
|
||||||
alternate TestIfAlternate
|
alternate TestIfAlternate
|
||||||
tag type
|
tag type
|
||||||
|
@ -347,7 +347,7 @@ object q_obj_TestIfAlternateCmd-arg
|
||||||
member alt_cmd_arg: TestIfAlternate optional=False
|
member alt_cmd_arg: TestIfAlternate optional=False
|
||||||
if ['defined(TEST_IF_ALT)']
|
if ['defined(TEST_IF_ALT)']
|
||||||
command TestIfAlternateCmd q_obj_TestIfAlternateCmd-arg -> None
|
command TestIfAlternateCmd q_obj_TestIfAlternateCmd-arg -> None
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
if ['defined(TEST_IF_ALT)']
|
if ['defined(TEST_IF_ALT)']
|
||||||
object q_obj_TestIfCmd-arg
|
object q_obj_TestIfCmd-arg
|
||||||
member foo: TestIfStruct optional=False
|
member foo: TestIfStruct optional=False
|
||||||
|
@ -355,10 +355,10 @@ object q_obj_TestIfCmd-arg
|
||||||
if ['defined(TEST_IF_CMD_BAR)']
|
if ['defined(TEST_IF_CMD_BAR)']
|
||||||
if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
|
if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
|
||||||
command TestIfCmd q_obj_TestIfCmd-arg -> UserDefThree
|
command TestIfCmd q_obj_TestIfCmd-arg -> UserDefThree
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
|
if ['defined(TEST_IF_CMD)', 'defined(TEST_IF_STRUCT)']
|
||||||
command TestCmdReturnDefThree None -> UserDefThree
|
command TestCmdReturnDefThree None -> UserDefThree
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
array TestIfEnumList TestIfEnum
|
array TestIfEnumList TestIfEnum
|
||||||
if ['defined(TEST_IF_ENUM)']
|
if ['defined(TEST_IF_ENUM)']
|
||||||
object q_obj_TestIfEvent-arg
|
object q_obj_TestIfEvent-arg
|
||||||
|
@ -367,7 +367,7 @@ object q_obj_TestIfEvent-arg
|
||||||
if ['defined(TEST_IF_EVT_BAR)']
|
if ['defined(TEST_IF_EVT_BAR)']
|
||||||
if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
|
if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
|
||||||
event TestIfEvent q_obj_TestIfEvent-arg
|
event TestIfEvent q_obj_TestIfEvent-arg
|
||||||
boxed=False
|
boxed=False
|
||||||
if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
|
if ['defined(TEST_IF_EVT) && defined(TEST_IF_STRUCT)']
|
||||||
object FeatureStruct0
|
object FeatureStruct0
|
||||||
member foo: int optional=False
|
member foo: int optional=False
|
||||||
|
@ -411,4 +411,4 @@ object q_obj_test-features-arg
|
||||||
member cfs2: CondFeatureStruct2 optional=False
|
member cfs2: CondFeatureStruct2 optional=False
|
||||||
member cfs3: CondFeatureStruct3 optional=False
|
member cfs3: CondFeatureStruct3 optional=False
|
||||||
command test-features q_obj_test-features-arg -> None
|
command test-features q_obj_test-features-arg -> None
|
||||||
gen=True success_response=True boxed=False oob=False preconfig=False
|
gen=True success_response=True boxed=False oob=False preconfig=False
|
||||||
|
|
|
@ -76,13 +76,13 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
|
||||||
print('command %s %s -> %s'
|
print('command %s %s -> %s'
|
||||||
% (name, arg_type and arg_type.name,
|
% (name, arg_type and arg_type.name,
|
||||||
ret_type and ret_type.name))
|
ret_type and ret_type.name))
|
||||||
print(' gen=%s success_response=%s boxed=%s oob=%s preconfig=%s'
|
print(' gen=%s success_response=%s boxed=%s oob=%s preconfig=%s'
|
||||||
% (gen, success_response, boxed, allow_oob, allow_preconfig))
|
% (gen, success_response, boxed, allow_oob, allow_preconfig))
|
||||||
self._print_if(ifcond)
|
self._print_if(ifcond)
|
||||||
|
|
||||||
def visit_event(self, name, info, ifcond, arg_type, boxed):
|
def visit_event(self, name, info, ifcond, arg_type, boxed):
|
||||||
print('event %s %s' % (name, arg_type and arg_type.name))
|
print('event %s %s' % (name, arg_type and arg_type.name))
|
||||||
print(' boxed=%s' % boxed)
|
print(' boxed=%s' % boxed)
|
||||||
self._print_if(ifcond)
|
self._print_if(ifcond)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
Loading…
Reference in a new issue