diff options
author | Thomas Huth <thuth@redhat.com> | 2020-01-21 10:52:04 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-02-06 13:47:45 +0100 |
commit | cd2058289bbe0437c2818f69a8c25a7618e906bd (patch) | |
tree | 6e6cc98eef60047252c6ae60e596e13414a5bfb7 /tests/qemu-iotests | |
parent | 9bdabfbe722e4d47892dfea17ae4c1670e54123b (diff) | |
download | qemu-cd2058289bbe0437c2818f69a8c25a7618e906bd.zip |
iotests: Skip Python-based tests if QEMU does not support virtio-blk
We are going to enable some of the python-based tests in the "auto" group,
and these tests require virtio-blk to work properly. Running iotests
without virtio-blk likely does not make too much sense anyway, so instead
of adding a check for the availability of virtio-blk to each and every
test (which does not sound very appealing), let's rather add a check for
this a central spot in the "check" script instead (so that it is still
possible to run "make check" for qemu-system-tricore for example).
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 20200121095205.26323-6-thuth@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests')
-rwxr-xr-x | tests/qemu-iotests/check | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 39ed5bc1be..fff5fa956a 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -655,7 +655,15 @@ fi python_usable=false if $PYTHON -c 'import sys; sys.exit(0 if sys.version_info >= (3,6) else 1)' then - python_usable=true + # Our python framework also requires virtio-blk + if "$QEMU_PROG" -M none -device help | grep -q virtio-blk >/dev/null 2>&1 + then + python_usable=true + else + python_unusable_because="Missing virtio-blk in QEMU binary" + fi +else + python_unusable_because="Unsupported Python version" fi default_machine=$($QEMU_PROG -machine help | sed -n '/(default)/ s/ .*//p') @@ -843,7 +851,7 @@ do run_command="$PYTHON $seq" else run_command="false" - echo "Unsupported Python version" > $seq.notrun + echo "$python_unusable_because" > $seq.notrun fi else run_command="./$seq" |