]> git.proxmox.com Git - mirror_qemu.git/blob - tests/check-block.sh
tests: Run the iotests during "make check" again
[mirror_qemu.git] / tests / check-block.sh
1 #!/bin/sh
2
3 # Honor the SPEED environment variable, just like we do it for the qtests.
4 if [ "$SPEED" = "slow" ]; then
5 format_list="raw qcow2"
6 group=
7 elif [ "$SPEED" = "thorough" ]; then
8 format_list="raw qcow2 qed vmdk vpc"
9 group=
10 else
11 format_list=qcow2
12 group="-g auto"
13 fi
14
15 if [ "$#" -ne 0 ]; then
16 format_list="$@"
17 fi
18
19 if 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
22 fi
23
24 if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then
25 echo "No qemu-system binary available ==> Not running the qemu-iotests."
26 exit 0
27 fi
28
29 if ! command -v bash >/dev/null 2>&1 ; then
30 echo "bash not available ==> Not running the qemu-iotests."
31 exit 0
32 fi
33
34 if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then
35 if ! command -v gsed >/dev/null 2>&1; then
36 echo "GNU sed not available ==> Not running the qemu-iotests."
37 exit 0
38 fi
39 fi
40
41 cd tests/qemu-iotests
42
43 ret=0
44 for fmt in $format_list ; do
45 ./check -makecheck -$fmt $group || ret=1
46 done
47
48 exit $ret