Fix Qemu cannot be used on Windows

Fix #291
This commit is contained in:
Julien Duponchelle committed 2015-08-26 13:47:12 +02:00
1 parent 70f62cd5eb
commit fea7a8a9ab
2 files changed
+17 -1

No files matched your search

+14
View File
@@ -240,6 +240,20 @@ def test_set_qemu_path_environ(vm, tmpdir, fake_qemu_binary):
assert vm.platform == "x86_64"
def test_set_qemu_path_windows(vm, tmpdir):
bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64w.EXE")
open(bin_path, "w+").close()
os.chmod(bin_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
vm.qemu_path = bin_path
assert vm.qemu_path == bin_path
assert vm.platform == "x86_64"
@pytest.mark.skipif(sys.platform.startswith("linux") is False, reason="Supported only on linux")
def test_set_qemu_path_kvm_binary(vm, tmpdir, fake_qemu_binary):