Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add flag to build.py for disabling KVM
  • Loading branch information
GabrielMajeri committed Nov 27, 2021
commit d66ba0ceb5c3ee2e4362301fecd0085f086b1b92
12 changes: 10 additions & 2 deletions uefi-test-runner/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
'config': 'debug',
# Disables some tests which don't work in our CI setup
'ci': False,
# KVM is a Linux kernel module which allows QEMU to use
# hardware-accelerated virtualization.
'disable_kvm': False,
# QEMU executable to use
# Indexed by the `arch` setting
'qemu_binary': {
Expand Down Expand Up @@ -247,8 +250,9 @@ def run_qemu():
'-m', '256M',
])
if not SETTINGS['ci']:
# Enable acceleration if possible.
qemu_flags.append('--enable-kvm')
# Enable hardware-accelerated virtualization if possible.
if not SETTINGS['disable_kvm']:
qemu_flags.append('--enable-kvm')
else:
# Exit instead of rebooting
qemu_flags.append('-no-reboot')
Expand Down Expand Up @@ -407,6 +411,9 @@ def main():
parser.add_argument('--ci', help='disables some tests which currently break CI',
action='store_true')

parser.add_argument('--disable-kvm', help='disables hardware accelerated virtualization support in QEMU',
action='store_true')

opts = parser.parse_args()

SETTINGS['arch'] = opts.target
Expand All @@ -415,6 +422,7 @@ def main():
SETTINGS['headless'] = opts.headless
SETTINGS['config'] = 'release' if opts.release else 'debug'
SETTINGS['ci'] = opts.ci
SETTINGS['disable_kvm'] = opts.disable_kvm

verb = opts.verb

Expand Down