summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-11-17 13:31:05 +0100
committerKevin Wolf <kwolf@redhat.com>2014-12-10 10:25:30 +0100
commitcc20b07a421ba39413111813b4016745fee11f08 (patch)
tree6c89c68cb6abe5785c28938fbc5aece9fddb04ca /tests
parent4821cd4cfd50185979d9a8c335acb62d97972dbb (diff)
downloadhqemu-cc20b07a421ba39413111813b4016745fee11f08.zip
hqemu-cc20b07a421ba39413111813b4016745fee11f08.tar.gz
iotests: _filter_qmp for pretty JSON output
_filter_qmp should be able to correctly filter out the QMP version object for pretty JSON output. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/common.filter4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index 3acdb30..dfb9726 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -167,7 +167,9 @@ _filter_qmp()
{
_filter_win32 | \
sed -e 's#\("\(micro\)\?seconds": \)[0-9]\+#\1 TIMESTAMP#g' \
- -e 's#^{"QMP":.*}$#QMP_VERSION#'
+ -e 's#^{"QMP":.*}$#QMP_VERSION#' \
+ -e '/^ "QMP": {\s*$/, /^ }\s*$/ c\' \
+ -e ' QMP_VERSION'
}
# replace driver-specific options in the "Formatting..." line
OpenPOWER on IntegriCloud