]> git.proxmox.com Git - qemu.git/commitdiff
qemu-iotests: Filter out DOS line endings
authorKevin Wolf <kwolf@redhat.com>
Fri, 29 Apr 2011 13:30:25 +0000 (15:30 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 29 Feb 2012 14:48:44 +0000 (15:48 +0100)
This one makes it possible to run qemu-iotests on a Windows build using Wine
and get somewhat meaningful results.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
tests/qemu-iotests/common.filter

index da77ede25ff678065a9cb09e719daf72a07f18f9..fa26b62dd3e15bfe5943248b42cf653448f10028 100644 (file)
@@ -140,10 +140,16 @@ _filter_imgfmt()
     sed -e "s#$IMGFMT#IMGFMT#g"
 }
 
+# Removes \r from messages
+_filter_win32()
+{
+    sed -e 's/\r//g'
+}
+
 # sanitize qemu-io output
 _filter_qemu_io()
 {
-    sed -e "s/[0-9]* ops\; [0-9/:. sec]* ([0-9/.inf]* [EPTGMKiBbytes]*\/sec and [0-9/.inf]* ops\/sec)/X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/"
+    _filter_win32 | sed -e "s/[0-9]* ops\; [0-9/:. sec]* ([0-9/.inf]* [EPTGMKiBbytes]*\/sec and [0-9/.inf]* ops\/sec)/X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/"
 }
 
 # make sure this script returns success