Skip to content

Commit ded0af4

Browse files
committed
[qa] Add option to run tests without KVM acceleration
Signed-off-by: Michael Brown <[email protected]>
1 parent 47efa60 commit ded0af4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/testwimboot

+9-5
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ parser.add_argument('--interactive', '-i', action='store_true',
157157
help="Launch interactive viewer")
158158
parser.add_argument('--romfile', '-r', metavar='FILE',
159159
help="iPXE boot ROM")
160+
parser.add_argument('--no-kvm', dest='kvm', action='store_false',
161+
help="Disable KVM acceleration")
160162
parser.add_argument('--timeout', '-t', type=int, default=60, metavar='T',
161163
help="Timeout (in seconds)")
162164
parser.add_argument('--verbose', '-v', action='count', default=0,
@@ -171,11 +173,13 @@ http_port = start_httpd()
171173
virt = libvirt.open(args.connection)
172174

173175
# Select a supported virtualisation type
174-
try:
175-
virt.getDomainCapabilities(virttype='kvm')
176-
virttype = 'kvm'
177-
except libvirt.libvirtError:
178-
virttype = 'qemu'
176+
virttype = 'qemu'
177+
if args.kvm:
178+
try:
179+
virt.getDomainCapabilities(virttype='kvm')
180+
virttype = 'kvm'
181+
except libvirt.libvirtError:
182+
pass
179183

180184
# Run test cases
181185
failures = []

0 commit comments

Comments
 (0)