mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-26 00:38:10 +00:00
Fix tests
This commit is contained in:
parent
3ae7783360
commit
36b9f8bdfd
@ -855,21 +855,15 @@ def test_options(linux_platform, vm):
|
|||||||
assert vm.kvm is False
|
assert vm.kvm is False
|
||||||
|
|
||||||
vm.options = "-no-kvm"
|
vm.options = "-no-kvm"
|
||||||
assert vm.options == "-no-kvm"
|
assert vm.options == "-machine accel=tcg"
|
||||||
|
|
||||||
vm.options = "-enable-kvm"
|
vm.options = "-enable-kvm"
|
||||||
assert vm.options == "-enable-kvm"
|
assert vm.options == "-machine accel=kvm"
|
||||||
|
|
||||||
vm.options = "-icount 12"
|
|
||||||
assert vm.options == "-no-kvm -icount 12"
|
|
||||||
|
|
||||||
vm.options = "-icount 12 -no-kvm"
|
|
||||||
assert vm.options == "-icount 12 -no-kvm"
|
|
||||||
|
|
||||||
|
|
||||||
def test_options_windows(windows_platform, vm):
|
def test_options_windows(windows_platform, vm):
|
||||||
vm.options = "-no-kvm"
|
vm.options = "-no-kvm"
|
||||||
assert vm.options == ""
|
assert vm.options == "-machine accel=tcg"
|
||||||
|
|
||||||
vm.options = "-enable-kvm"
|
vm.options = "-enable-kvm"
|
||||||
assert vm.options == ""
|
assert vm.options == ""
|
||||||
@ -919,7 +913,7 @@ async def test_run_with_kvm_linux_options_no_kvm(linux_platform, vm):
|
|||||||
|
|
||||||
with patch("os.path.exists", return_value=True) as os_path:
|
with patch("os.path.exists", return_value=True) as os_path:
|
||||||
vm.manager.config.settings.Qemu.enable_hardware_acceleration = True
|
vm.manager.config.settings.Qemu.enable_hardware_acceleration = True
|
||||||
assert await vm._run_with_hardware_acceleration("qemu-system-x86_64", "-no-kvm") is False
|
assert await vm._run_with_hardware_acceleration("qemu-system-x86_64", "-machine accel=tcg") is False
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
Loading…
Reference in New Issue
Block a user