@@ -23,7 +23,8 @@
from typing import Optional
# pylint: disable=import-error
-from .accel import hvf_available, kvm_available, list_accel, tcg_available
+from .accel import hvf_available, kvm_available, list_accel, tcg_available, \
+ split_available
__all__ = (
@@ -90,3 +90,13 @@ def hvf_available(qemu_bin: str) -> bool:
@param qemu_bin (str): path to the QEMU binary
"""
return 'hvf' in list_accel(qemu_bin)
+
+def split_available(qemu_bin: str) -> bool:
+ """
+ Check if split accelerator is available.
+
+ @param qemu_bin (str): path to the QEMU binary
+ """
+ return 'split' in list_accel(qemu_bin) \
+ and tcg_available(qemu_bin) \
+ and hvf_available(qemu_bin)
@@ -23,7 +23,8 @@
import uuid
from qemu.machine import QEMUMachine
-from qemu.utils import hvf_available, kvm_available, tcg_available
+from qemu.utils import hvf_available, kvm_available, tcg_available, \
+ split_available
from .archive import archive_extract
from .asset import Asset
@@ -319,6 +320,7 @@ def require_accelerator(self, accelerator):
checker = {'tcg': tcg_available,
'kvm': kvm_available,
'hvf': hvf_available,
+ 'split': split_available,
}.get(accelerator)
if checker is None:
self.skipTest("Don't know how to check for the presence "
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- python/qemu/utils/__init__.py | 3 ++- python/qemu/utils/accel.py | 10 ++++++++++ tests/functional/qemu_test/testcase.py | 4 +++- 3 files changed, 15 insertions(+), 2 deletions(-)