[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 5/6] iotests: Skip Python-based tests if QEMU does not support
From: |
Thomas Huth |
Subject: |
[PATCH v4 5/6] iotests: Skip Python-based tests if QEMU does not support virtio-blk |
Date: |
Mon, 2 Dec 2019 11:10:38 +0100 |
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 <address@hidden>
---
tests/qemu-iotests/check | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 90970b0549..bce3035d5a 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -642,7 +642,11 @@ 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
+ fi
fi
default_machine=$($QEMU_PROG -machine help | sed -n '/(default)/ s/ .*//p')
@@ -830,7 +834,7 @@ do
run_command="$PYTHON $seq"
else
run_command="false"
- echo "Unsupported Python version" > $seq.notrun
+ echo "Unsupported Python version or missing virtio-blk" >
$seq.notrun
fi
else
run_command="./$seq"
--
2.18.1
- [PATCH v4 0/6] Enable more iotests during "make check-block", Thomas Huth, 2019/12/02
- [PATCH v4 1/6] iotests: remove 'linux' from default supported platforms, Thomas Huth, 2019/12/02
- [PATCH v4 2/6] iotests: Test 041 only works on certain systems, Thomas Huth, 2019/12/02
- [PATCH v4 3/6] iotests: Test 183 does not work on macOS and OpenBSD, Thomas Huth, 2019/12/02
- [PATCH v4 6/6] iotests: Enable more tests in the 'auto' group to improve test coverage, Thomas Huth, 2019/12/02
- [PATCH v4 5/6] iotests: Skip Python-based tests if QEMU does not support virtio-blk,
Thomas Huth <=
- [PATCH v4 4/6] iotests: Check for the availability of the required devices in 267 and 127, Thomas Huth, 2019/12/02