Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ci/qemu_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@
import pytest


@pytest.fixture
@pytest.fixture(scope="module")
def vm():
"""A pexpect.spawn object attached to the serial console of a VM freshly
booting with a CoW base of disk-ufs.img"""
# Since qemu booting is slow and we want fast developer iteration, we make the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should that comment be a couple of lines higher, near the scope definition for the fixture?

# optimisation compromise that we will not reset the qemu test fixture from a
# fresh image for every test. Most tests should not collide with each other. If
# we think a new test will do that and we want to make the compromise of giving
# it an isolated environment for a slower test suite, we can deal with that
# then.
with tempfile.TemporaryDirectory() as tmpdir:
qcow_path = os.path.join(tmpdir, "disk1.qcow")
subprocess.run(
Expand Down