aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common.config
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/common.config')
-rw-r--r--tests/qemu-iotests/common.config6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index bdd053095b..d5a72affc6 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -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