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

login
register
mail settings
Submitter Lyu Mitnick
Date April 11, 2011, 8:05 p.m.
Message ID <1302552344-2987-1-git-send-email-mitnick.lyu@gmail.com>
Download mbox | patch
Permalink /patch/90689/
State New
Headers show

Comments

Lyu Mitnick - April 11, 2011, 8:05 p.m.
mkdir $TEST_DIR on common.config first run

Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com>
---
 common.config |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Christoph Hellwig - April 21, 2011, 6:49 a.m.
On Tue, Apr 12, 2011 at 04:05:44AM +0800, Mitnick Lyu wrote:
> mkdir $TEST_DIR on common.config first run
> 
> Signed-off-by: Mitnick Lyu <mitnick.lyu@gmail.com>

Thanks, applied!

Patch

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