Skip to content

conftest: split vm-type fixtures into require and skip variants - #579

Draft
d3athjest3r wants to merge 1 commit into
masterfrom
replace_fixtures
Draft

conftest: split vm-type fixtures into require and skip variants#579
d3athjest3r wants to merge 1 commit into
masterfrom
replace_fixtures

Conversation

@d3athjest3r

Copy link
Copy Markdown
Contributor

Opened new pull-request based on #410
Ping: @stormi

unix_vm, windows_vm, and uefi_vm now call pytest.fail() if the VM is the wrong type, matching the expectation that these fixtures enforce a requirement. The new skip_if_not_unix_vm, skip_if_not_windows_vm, and skip_if_not_uefi_vm fixtures call pytest.skip() instead, for use in multi-VM jobs where different VMs types are expected and non-matching ones should be silently skipped rather than failed. So, updated all multi_vms-annotated classes to use the skip variants. The markable_fixtures list and jobs.py marker expressions are updated accordingly.

@d3athjest3r
d3athjest3r requested review from a team as code owners June 9, 2026 08:09
unix_vm, windows_vm, and uefi_vm now call pytest.fail() if the VM is the
wrong type, matching the expectation that these fixtures enforce a
requirement. The new skip_if_not_unix_vm, skip_if_not_windows_vm, and
skip_if_not_uefi_vm fixtures call pytest.skip() instead, for use in
multi-VM jobs where different VMs types are expected and non-matching
ones should be silently skipped rather than failed. So, updated all
multi_vms-annotated classes to use the skip variants. The
markable_fixtures list and jobs.py marker expressions are updated
accordingly.

Signed-off-by: Julian Vetter <julian.vetter@vates.tech>

@casasnovas casasnovas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The commit description is a bit misleading (or I'm missing something), in that the current unix_vm, windows_vm and uefi_vm actually skip the test and don't fail it - it's only after your change that they do fail the test. It does seem to imply that tests that were previously skipped will now fail (since you haven't changed all to use the new skip_if_not_* variant, is this intentional?

@d3athjest3r
d3athjest3r marked this pull request as draft July 10, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants