Skip to content

[New Check]: Detect likely-broken virtx use (nonfatal) #748

@thesamesam

Description

@thesamesam

Is there an existing such new check request for this?

  • I have searched the existing issues

Explain

I sometimes see test failures being accidentally ignored when virtualx.eclass is in use, because

src_test() {
    virtx default
}

... will ignore any failures from default.

This is also covered in the Python guide:

Explicit || die is only necessary when overriding python_test and running epytest inside a nonfatal. The virtx command runs its arguments via a nonfatal. The default python_test implementation created by distutils_enable_tests accounts for this. In other contexts, epytest will die on its own.

Note that there's some trickiness here. We can't always complain about nonfatal without die, see gentoo/portage#911.

Examples

multilib_src_test() {
	CI=1 virtx emake test
}
  • dev-python/tikzplotlib, fixed in c81c9f363c84d88bc8221276dfa79c6f30004c19
  • dev-python/qtawesome, fixed in 7abd100b81820f3780ffe521a35ae78f22c0f2d7
  • app-text/nfoview, fixed in 9b6edb1bbe2f8f12c824e707fd199a983fbfd9ed

Output message

VirtualxNonfatalMissingDie

Documentation

virtx uses nonfatal, meaning that failures are ignored by default. Direct use of virtx should usually be accompanied by a die.

Result level

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions