git clone https://github.com/qemu/qemu.git
cd qemu
-if lsb_release -da | grep -iq xenial; then
+if lsb_release -da 2>&1 | grep -iq 'bionic'; then
+ # Bionic requires a matching test harness
+ git checkout v2.11.0
+elif lsb_release -da 2>&1 | grep -iq 'xenial'; then
# Xenial requires a recent test harness
git checkout v2.3.0
else
# use v2.2.0-rc3 (last released version that handles all the tests
git checkout 2528043f1f299e0e88cb026f1ca7c40bbb4e1f80
-
fi
cd tests/qemu-iotests
if [ -x '/usr/bin/qemu-system-x86_64' ]
then
QEMU='/usr/bin/qemu-system-x86_64'
+
+ # Bionic (v2.11.0) tests expect all tools in current directory
+ ln -s $QEMU qemu
+ ln -s /usr/bin/qemu-img
+ ln -s /usr/bin/qemu-io
+ ln -s /usr/bin/qemu-nbd
else
QEMU='/usr/libexec/qemu-kvm'