]> git.proxmox.com Git - qemu.git/blobdiff - tests/qemu-iotests/common.filter
Merge git://github.com/hw-claudio/qemu-aarch64-queue into tcg-next
[qemu.git] / tests / qemu-iotests / common.filter
index b12f50bdf5277554c3dc43e01a976970e2da9b37..9dbcae8d8ce357ad6d2efadc8e1de921d00d1366 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright (C) 2009 Red Hat, Inc.
 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
@@ -13,8 +13,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 #
 # standard filters
@@ -129,16 +128,34 @@ _filter_date()
        -e 's/[A-Z][a-z][a-z] [A-z][a-z][a-z]  *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]$/DATE/'
 }
 
-# replace occurances of the actual TEST_DIR value with TEST_DIR
+# replace occurrences of the actual TEST_DIR value with TEST_DIR
 _filter_testdir()
 {
     sed -e "s#$TEST_DIR#TEST_DIR#g"
 }
 
+# replace occurrences of the actual IMGFMT value with IMGFMT
+_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/.]* [GMKiBbytes]*\/sec and [0-9/.]* 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)/"
+}
+
+# replace occurrences of QEMU_PROG with "qemu"
+_filter_qemu()
+{
+    sed -e "s#\\(^\\|(qemu) \\)$(basename $QEMU_PROG):#\1QEMU_PROG:#"
 }
 
 # make sure this script returns success