Merge pull request #1718 from ceph/wip-7882-wusui

Support latest qemu iotest code

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
This commit is contained in:
Josh Durgin 2014-04-23 13:47:02 -07:00
commit 76a2138908

View File

@ -6,17 +6,46 @@
# to qemu-iotests currently.
# This will only work with particular qemu versions, like 1.0. Later
# versions of qemu includ qemu-iotests directly in the qemu
# versions of qemu include qemu-iotests directly in the qemu
# repository.
git clone git://ceph.com/git/qemu-iotests.git
codevers=`lsb_release -sc`
iotests=qemu-iotests
testlist='001 002 003 004 005 008 009 010 011 021 025'
# See if we need to use the iotests suites in qemu (newer version).
# Right now, trusty is the only version that uses this.
for chkcode in "trusty"
do
if [ "$chkcode" = "$codevers" ]
then
iotests=qemu/tests/qemu-iotests
fi
done
if [ "$iotests" = "qemu/tests/qemu-iotests" ]
then
git clone git://repo.or.cz/qemu.git
testlist=$testlist' 032 033 055 077'
else
git clone git://ceph.com/git/qemu-iotests.git
fi
cd "$iotests"
cd qemu-iotests
mkdir bin
# qemu-iotests expects a binary called just 'qemu' to be available
ln -s `which qemu-system-x86_64` bin/qemu
# TEST_DIR is the pool for rbd
TEST_DIR=rbd PATH="$PATH:$PWD/bin" ./check -rbd
TEST_DIR=rbd PATH="$PATH:$PWD/bin" ./check -rbd $testlist
if [ "$iotests" = "qemu/tests/qemu-iotests" ]
then
cd ../../..
else
cd ..
fi
dname=`echo $iotests | cut -d "/" -f1`
rm -rf $dname
cd ..
rm -rf qemu-iotests