diff options
author | Kevin Wolf <kwolf@redhat.com> | 2019-11-19 18:36:09 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-12-18 11:21:16 +0100 |
commit | a96f0350e3d95c98f2bff1863d14493af5c1d360 (patch) | |
tree | b2750a1d531840a546d3d0f616e0e49b4a464c86 /tests/qemu-iotests/iotests.py | |
parent | 3b65081638c68be1c6ed08635c8acd99f32320ac (diff) |
iotests: Add qemu_io_log()
Add a function that runs qemu-io and logs the output with the
appropriate filters applied.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
-rw-r--r-- | tests/qemu-iotests/iotests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index df0708923d..fc78852ae5 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -162,6 +162,11 @@ def qemu_io(*args): sys.stderr.write('qemu-io received signal %i: %s\n' % (-exitcode, ' '.join(args))) return subp.communicate()[0] +def qemu_io_log(*args): + result = qemu_io(*args) + log(result, filters=[filter_testfiles, filter_qemu_io]) + return result + def qemu_io_silent(*args): '''Run qemu-io and return the exit code, suppressing stdout''' args = qemu_io_args + list(args) |