Skip to content

Commit

Permalink
[qa] Add option to run tests without KVM acceleration
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <[email protected]>
  • Loading branch information
mcb30 committed Dec 19, 2023
1 parent 47efa60 commit ded0af4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/testwimboot
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ parser.add_argument('--interactive', '-i', action='store_true',
help="Launch interactive viewer")
parser.add_argument('--romfile', '-r', metavar='FILE',
help="iPXE boot ROM")
parser.add_argument('--no-kvm', dest='kvm', action='store_false',
help="Disable KVM acceleration")
parser.add_argument('--timeout', '-t', type=int, default=60, metavar='T',
help="Timeout (in seconds)")
parser.add_argument('--verbose', '-v', action='count', default=0,
Expand All @@ -171,11 +173,13 @@ http_port = start_httpd()
virt = libvirt.open(args.connection)

# Select a supported virtualisation type
try:
virt.getDomainCapabilities(virttype='kvm')
virttype = 'kvm'
except libvirt.libvirtError:
virttype = 'qemu'
virttype = 'qemu'
if args.kvm:
try:
virt.getDomainCapabilities(virttype='kvm')
virttype = 'kvm'
except libvirt.libvirtError:
pass

# Run test cases
failures = []
Expand Down

0 comments on commit ded0af4

Please sign in to comment.