]> git.proxmox.com Git - mirror_qemu.git/blame - tests/check-block.sh
migration: use migration_is_active to represent active state
[mirror_qemu.git] / tests / check-block.sh
CommitLineData
b8c6f29e
KW
1#!/bin/sh
2
bdd95e47
TH
3# Honor the SPEED environment variable, just like we do it for the qtests.
4if [ "$SPEED" = "slow" ]; then
5 format_list="raw qcow2"
6 group=
7elif [ "$SPEED" = "thorough" ]; then
8 format_list="raw qcow2 qed vmdk vpc"
9 group=
10else
11 format_list=qcow2
12 group="-g auto"
13fi
14
c2519009 15if [ "$#" -ne 0 ]; then
bdd95e47
TH
16 format_list="$@"
17fi
18
19if grep -q "TARGET_GPROF=y" *-softmmu/config-target.mak 2>/dev/null ; then
20 echo "GPROF is enabled ==> Not running the qemu-iotests."
21 exit 0
c2519009
DL
22fi
23
2cc4d1c5
TH
24if grep -q "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ; then
25 echo "Sanitizers are enabled ==> Not running the qemu-iotests."
26 exit 0
27fi
28
bdd95e47
TH
29if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then
30 echo "No qemu-system binary available ==> Not running the qemu-iotests."
31 exit 0
32fi
33
34if ! command -v bash >/dev/null 2>&1 ; then
35 echo "bash not available ==> Not running the qemu-iotests."
36 exit 0
37fi
b8c6f29e 38
bdd95e47
TH
39if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then
40 if ! command -v gsed >/dev/null 2>&1; then
41 echo "GNU sed not available ==> Not running the qemu-iotests."
42 exit 0
43 fi
b8c6f29e
KW
44fi
45
7467d94c 46cd tests/qemu-iotests
b8c6f29e
KW
47
48ret=0
bdd95e47
TH
49for fmt in $format_list ; do
50 ./check -makecheck -$fmt $group || ret=1
c2519009 51done
b8c6f29e
KW
52
53exit $ret