aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-04-01 09:30:20 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-04-01 09:30:20 +0200
commit972b0ceecb88276ee0b81e20400a970043c7e57b (patch)
tree3aebcb1426ec0006839e4769b70fbc459b0659fb
parent5b3fbf62c771483eafc11cb99841d971ca6b08e9 (diff)
downloaddrminfo-972b0ceecb88276ee0b81e20400a970043c7e57b.tar.gz
make qemu binary configurable
-rw-r--r--tests/README3
-rw-r--r--tests/drminfo/__init__.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/README b/tests/README
index 80e490e..d6437ee 100644
--- a/tests/README
+++ b/tests/README
@@ -14,6 +14,9 @@ configuration
Tests can be configured using two environment variables.
+QEMU_BINARY (optional)
+ Points to a qemu binary to use.
+
QEMU_BUILD_DIR (optional)
Points to a qemu build tree. Uses the qemu binaries there for
testing (instead of the installed version).
diff --git a/tests/drminfo/__init__.py b/tests/drminfo/__init__.py
index 1f5c61e..d586e61 100644
--- a/tests/drminfo/__init__.py
+++ b/tests/drminfo/__init__.py
@@ -14,6 +14,7 @@ from avocado.utils.process import run
from qemu import QEMUMachine
# configuration
+QEMU_BINARY = os.environ.get("QEMU_BUILD_DIR");
QEMU_BUILD_DIR = os.environ.get("QEMU_BUILD_DIR");
LINUX_BUILD_DIR = os.environ.get("LINUX_BUILD_DIR");
@@ -35,6 +36,8 @@ class TestDRM(avocado.Test):
"%s-softmmu" % arch,
"qemu-system-%s" % arch)
qemu_path.insert(0, qemu_build)
+ if not QEMU_BINARY is None:
+ qemu_path.insert(0, QEMU_BINARY)
for item in qemu_path:
if os.path.isfile(item):