summaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/common.config
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2014-06-26 20:28:10 +0900
committerChanho Park <chanho61.park@samsung.com>2014-07-07 16:25:44 +0900
commita15119db2ff5c2fdfdeb913b297bf8aa3399132e (patch)
tree7d6f779408bb772b11c029ab88000fc01856b599 /tests/qemu-iotests/common.config
parent340f06c9eaee097e626c251bf7a013350649c091 (diff)
downloadqemu-a15119db2ff5c2fdfdeb913b297bf8aa3399132e.tar.gz
qemu-a15119db2ff5c2fdfdeb913b297bf8aa3399132e.tar.bz2
qemu-a15119db2ff5c2fdfdeb913b297bf8aa3399132e.zip
Imported Upstream version 2.0.0upstream/2.0.0
Change-Id: I081766c4314e7893f54fec80b920b1638d15021f
Diffstat (limited to 'tests/qemu-iotests/common.config')
-rw-r--r--tests/qemu-iotests/common.config17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index 08a3f100b..d90a8bca8 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -19,7 +19,7 @@
# setup and check for config parameters, and in particular
#
# EMAIL - email of the script runner.
-# TEST_DIR - scratch test directory
+# TEST_DIR - scratch test directory
#
# - These can be added to $HOST_CONFIG_DIR (witch default to ./config)
# below or a separate local configuration file can be used (using
@@ -111,11 +111,11 @@ export QEMU_NBD=$QEMU_NBD_PROG
[ -f /etc/qemu-iotest.config ] && . /etc/qemu-iotest.config
if [ -z "$TEST_DIR" ]; then
- TEST_DIR=`pwd`/scratch
+ TEST_DIR=`pwd`/scratch
fi
if [ ! -e "$TEST_DIR" ]; then
- mkdir "$TEST_DIR"
+ mkdir "$TEST_DIR"
fi
if [ ! -d "$TEST_DIR" ]; then
@@ -125,6 +125,17 @@ fi
export TEST_DIR
+if [ -z "$SAMPLE_IMG_DIR" ]; then
+ SAMPLE_IMG_DIR=`pwd`/sample_images
+fi
+
+if [ ! -d "$SAMPLE_IMG_DIR" ]; then
+ echo "common.config: Error: \$SAMPLE_IMG_DIR ($SAMPLE_IMG_DIR) is not a directory"
+ exit 1
+fi
+
+export SAMPLE_IMG_DIR
+
_readlink()
{
if [ $# -ne 1 ]; then