qemu-iotests: common.config: Fix no $TEST_DIR directory

mkdir $TEST_DIR on common.config first run

Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Mitnick Lyu 2011-04-12 04:05:44 +08:00 committed by Kevin Wolf
parent 5177c51245
commit 5e654e08ff
1 changed files with 5 additions and 1 deletions

View File

@ -102,8 +102,12 @@ export QEMU_IO="$QEMU_IO_PROG $QEMU_IO_OPTIONS"
[ -f /etc/qemu-iotest.config ] && . /etc/qemu-iotest.config
if [ -z "$TEST_DIR" ]; then
TEST_DIR=`pwd`/scratch
fi
if [ ! -e "$TEST_DIR" ]; then
TEST_DIR=`pwd`/scratch
mkdir "$TEST_DIR"
fi
if [ ! -d "$TEST_DIR" ]; then