aboutsummaryrefslogtreecommitdiff
path: root/tests/vm/basevm.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/basevm.py')
-rw-r--r--tests/vm/basevm.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 4a1af04..9e879e9 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -83,7 +83,7 @@ class BaseVM(object):
# command to halt the guest, can be overridden by subclasses
poweroff = "poweroff"
# Time to wait for shutdown to finish.
- shutdown_timeout_default = 30
+ shutdown_timeout_default = 90
# enable IPv6 networking
ipv6 = True
# This is the timeout on the wait for console bytes.
@@ -520,8 +520,7 @@ def get_qemu_path(arch, build_path=None):
if "QEMU" in os.environ:
qemu_path = os.environ["QEMU"]
elif build_path:
- qemu_path = os.path.join(build_path, arch + "-softmmu")
- qemu_path = os.path.join(qemu_path, "qemu-system-" + arch)
+ qemu_path = os.path.join(build_path, "qemu-system-" + arch)
else:
# Default is to use system path for qemu.
qemu_path = "qemu-system-" + arch
@@ -613,8 +612,11 @@ def parse_args(vmcls):
parser.add_argument("--source-path", default=None,
help="Path of source directory, "\
"for finding additional files. ")
- parser.add_argument("--interactive", "-I", action="store_true",
- help="Interactively run command")
+ int_ops = parser.add_mutually_exclusive_group()
+ int_ops.add_argument("--interactive", "-I", action="store_true",
+ help="Interactively run command")
+ int_ops.add_argument("--interactive-root", action="store_true",
+ help="Interactively run command as root")
parser.add_argument("--snapshot", "-s", action="store_true",
help="run tests with a snapshot")
parser.add_argument("--genisoimage", default="genisoimage",
@@ -676,6 +678,8 @@ def main(vmcls, config=None):
exitcode = 3
if args.interactive:
vm.ssh()
+ elif args.interactive_root:
+ vm.ssh_root()
if not args.snapshot:
vm.graceful_shutdown()