mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 11:53:53 -06:00
tests/functional: Add hvf_available() helper
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20250623121845.7214-26-philmd@linaro.org [PMM: tweaks to satisfy the python linter CI job] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
f4b5fbeff6
commit
767df742fb
3 changed files with 20 additions and 3 deletions
|
@ -23,13 +23,19 @@ import textwrap
|
|||
from typing import Optional
|
||||
|
||||
# pylint: disable=import-error
|
||||
from .accel import kvm_available, list_accel, tcg_available
|
||||
from .accel import (
|
||||
hvf_available,
|
||||
kvm_available,
|
||||
list_accel,
|
||||
tcg_available,
|
||||
)
|
||||
|
||||
|
||||
__all__ = (
|
||||
'VerboseProcessError',
|
||||
'add_visual_margin',
|
||||
'get_info_usernet_hostfwd_port',
|
||||
'hvf_available',
|
||||
'kvm_available',
|
||||
'list_accel',
|
||||
'tcg_available',
|
||||
|
|
|
@ -82,3 +82,12 @@ def tcg_available(qemu_bin: str) -> bool:
|
|||
@param qemu_bin (str): path to the QEMU binary
|
||||
"""
|
||||
return 'tcg' in list_accel(qemu_bin)
|
||||
|
||||
|
||||
def hvf_available(qemu_bin: str) -> bool:
|
||||
"""
|
||||
Check if HVF is available.
|
||||
|
||||
@param qemu_bin (str): path to the QEMU binary
|
||||
"""
|
||||
return 'hvf' in list_accel(qemu_bin)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue