mkdir $TEST_DIR on common.config first run

Signed-off-by: Mitnick Lyu <mitnick....@gmail.com>
---
 common.config |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/common.config b/common.config
index bdd0530..d5a72af 100644
--- a/common.config
+++ b/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
-- 
1.7.0.4


Reply via email to