debian-forge/test/test_boot.py
David Rheinsberg 4587d97522 test/boot: convert -accel ... -> -M accel=... for qemu
Recent qemu version will warn with our current code:

    qemu-system-x86_64: -accel kvm:hvf:tcg: Don't use ':' with -accel,
                        use -M accel=... for now instead

Since this might result in hard-errors, lets just follow the advice and
use the `-M` switch.
2020-03-27 08:28:14 +01:00

29 lines
813 B
Python

import subprocess
import unittest
from . import osbuildtest
class TestBoot(osbuildtest.TestCase):
def test_boot(self):
_, output_id = self.run_osbuild("test/pipelines/f30-boot.json")
r = subprocess.run(["qemu-system-x86_64",
"-snapshot",
"-m", "1024",
"-M", "accel=kvm:hvf:tcg",
# be silent
"-nographic",
"-monitor", "none",
"-serial", "none",
# create /dev/vport0p1
"-chardev", "stdio,id=stdio",
"-device", "virtio-serial",
"-device", "virtserialport,chardev=stdio",
f"{self.get_path_to_store(output_id)}/f30-boot.qcow2"
], encoding="utf-8", stdout=subprocess.PIPE, check=True)
self.assertEqual(r.stdout.strip(), "running")