aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Meneghel Rodrigues <lmr@redhat.com>2011-12-01 11:41:24 -0200
committerChristoph Hellwig <hch@lst.de>2011-12-08 16:51:51 +0000
commit4e1cfca61e977bb34eeb7978db596fce15282cf7 (patch)
tree5fa17ea17473772fc055818c2b8645202599092f
parent1dfbf5d8c43e85bc0da1fc7e7cd9eab1ff61b85d (diff)
downloadqemu-iotests-4e1cfca61e977bb34eeb7978db596fce15282cf7.tar.gz
common.config: Allow use of arbitrary qemu* pathsHEADmaster
Since we might want to test arbitrary qemu, qemu-img and qemu-io paths, allow users to specify environment variable values for QEMU_PROG, QEMU_IMG_PROG and QEMU_IO_PROG so the testsuite will use those values rather than find them on PATH. Obviously, if such env variables are not set prior to script execution, normal detection mechanism takes place. Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--common.config12
1 files changed, 9 insertions, 3 deletions
diff --git a/common.config b/common.config
index d5a72af..d07f435 100644
--- a/common.config
+++ b/common.config
@@ -87,13 +87,19 @@ export BC_PROG="`set_prog_path bc`"
export PS_ALL_FLAGS="-ef"
-export QEMU_PROG="`set_prog_path qemu`"
+if [ -z "$QEMU_PROG" ]; then
+ export QEMU_PROG="`set_prog_path qemu`"
+fi
[ "$QEMU_PROG" = "" ] && _fatal "qemu not found"
-export QEMU_IMG_PROG="`set_prog_path qemu-img`"
+if [ -z "$QEMU_IMG_PROG" ]; then
+ export QEMU_IMG_PROG="`set_prog_path qemu-img`"
+fi
[ "$QEMU_IMG_PROG" = "" ] && _fatal "qemu-img not found"
-export QEMU_IO_PROG="`set_prog_path qemu-io`"
+if [ -z "$QEMU_IO_PROG" ]; then
+ export QEMU_IO_PROG="`set_prog_path qemu-io`"
+fi
[ "$QEMU_IO_PROG" = "" ] && _fatal "qemu-io not found"
export QEMU=$QEMU_PROG