Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ebuild: do not drop FEATURES=test when USE=-test #1116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

floppym
Copy link
Contributor

@floppym floppym commented Oct 4, 2023

By convention the "test" USE flag is used to control dependencies required for execution of the src_test function.

The "test" USE flag has no special meaning in PMS.

The Gentoo Policy Guide [1] advises that ebuilds must make use of RESTRICT to disable tests based on USE flags.

Current versions of Portage will not run tests when RESTRICT=test is set, regardless of the FEATURES setting.

This code in Portage predates the Gentoo policy. It is unneeded since the policy was created and ebuilds have been updated with the necessary RESTRICT values.

[1] https://projects.gentoo.org/qa/policy-guide/other-metadata.html#pg0703

By convention the "test" USE flag is used to control dependencies required
for execution of the src_test function.

The "test" USE flag has no special meaning in PMS.

The Gentoo Policy Guide [1] advises that ebuilds must make use of RESTRICT
to disable tests based on USE flags.

Current versions of Portage will not run tests when RESTRICT=test is
set, regardless of the FEATURES setting.

This code in Portage predates the Gentoo policy. It is unneeded since
the policy was created and ebuilds have been updated with the necessary
RESTRICT values.

[1] https://projects.gentoo.org/qa/policy-guide/other-metadata.html#pg0703

Signed-off-by: Mike Gilbert <[email protected]>
@zmedico
Copy link
Member

zmedico commented Oct 4, 2023

The interaction between EBUILD_FORCE_TEST and use.mask has implication for the export USE="${USE} test" code here that we should probably also review:
https://github.com/gentoo/portage/blob/master/bin/ebuild.sh#L763

@floppym
Copy link
Contributor Author

floppym commented Oct 4, 2023

Hmm. I would would say that EBUILD_FORCE_TEST should only cause the test phase to be executed, possibly even overriding RESTRICT.

I don't see any reason to modify USE based on EBUILD_FORCE_TEST, especially since it is only meant for developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants