mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-02-15 17:09:31 -07:00
iotests.py: Add filter_imgfmt()
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190201192935.18394-7-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
909936234c
commit
f2ea0b2082
1 changed files with 10 additions and 0 deletions
|
|
@ -304,6 +304,16 @@ def filter_img_info(output, filename):
|
|||
lines.append(line)
|
||||
return '\n'.join(lines)
|
||||
|
||||
def filter_imgfmt(msg):
|
||||
return msg.replace(imgfmt, 'IMGFMT')
|
||||
|
||||
def filter_qmp_imgfmt(qmsg):
|
||||
def _filter(key, value):
|
||||
if is_str(value):
|
||||
return filter_imgfmt(value)
|
||||
return value
|
||||
return filter_qmp(qmsg, _filter)
|
||||
|
||||
def log(msg, filters=[], indent=None):
|
||||
'''Logs either a string message or a JSON serializable message (like QMP).
|
||||
If indent is provided, JSON serializable messages are pretty-printed.'''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue