qemu-io tests: More fine grained control of qemu paths
cover qemu-io tests: More fine grained control of qemu paths
In automated test environments, we often build and test qemu from arbitrary paths, rather than installing them on standard PATH directories. Of course, appending directories to PATH might produce the desired result, but making it possible to specify arbitrary qemu paths through environment variables is very convenient and minimally intrusive.
So, make it possible to set qemu paths through env variables, and also, print the paths of the qemu versions being tested, for clarity sake.
Lucas Meneghel Rodrigues (2):
check: print relevant path information common.config: Allow use of arbitrary qemu* paths
check | 3 +++ common.config | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.7.3
PATCH 1/2 check: print relevant path information
Print the paths of the programs under test
(qemu, qemu-img and qemu-io).
--- check | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
check +3 -0
@@ -158,6 +158,9 @@ FULL_HOST_DETAILS=`_full_platform_details` #FULL_MOUNT_OPTIONS=`_scratch_mount_options` cat <<EOF +QEMU -- $QEMU +QEMU_IMG -- $QEMU_IMG +QEMU_IO -- $QEMU_IO IMGFMT -- $FULL_IMGFMT_DETAILS IMGPROTO -- $FULL_IMGPROTO_DETAILS PLATFORM -- $FULL_HOST_DETAILS
Signature · 1 line
1.7.7.3
PATCH 2/2 common.config: Allow use of arbitrary qemu* paths
In reply to Lucas Meneghel RodriguesSince 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.
--- common.config | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
common.config +9 -3
@@ -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
Signature · 1 line
1.7.7.3
Thanks a lot Lucas,
I've applied the patches. And sorry for the delay, I'm pretty busy at the moment.