-
Notifications
You must be signed in to change notification settings - Fork 2k
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
distutils-r1/python-utils-r1.eclass: Support EPYTEST_XDIST #33667
Conversation
Pull Request assignmentSubmitter: @mgorny dev-python/numpy: @gentoo/sci, @gentoo/python Linked bugsNo bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment. If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers. In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
Pull request CI reportReport generated at: 2023-11-03 19:42 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Especially ${EPYTEST_JOBS}
will help on devboxes such as catbus.sparc, where we have a huge amount of cores, that work well with make or ninja, but with pytest-xdist this job count doesn't work well (each core is very weak) - so now I can set it up with normal amount of jobs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, had a peek at metadata too and not seeing anything off
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Add an `EPYTEST_XDIST` variable that can be used to enable running the test suite in parallel via the dev-python/pytest-xdist plugin. This also includes user-facing `EPYTEST_JOBS` to control the job count independently of `MAKEOPTS`. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Make `distutils_enable_tests pytest` automatically add the `dev-python/pytest-xdist` dependency if `EPYTEST_XDIST` is set. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Pull request CI reportReport generated at: 2023-11-04 06:17 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I got fed up of copying this everywhere.
>=dev-python/pytz-2019.3[${PYTHON_USEDEP}] | ||
) | ||
" | ||
|
||
EPYTEST_XDIST=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer it if we always kept eclass vars above inherit, but w/e.
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then | ||
test_deps+=" ${test_pkg}[${PYTHON_USEDEP}]" | ||
test_deps+=" ${test_pkgs//'${PYTHON_USEDEP}'/${PYTHON_USEDEP}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks a bit grim but if the metadata looks ok, good enough.
Add an
EPYTEST_XDIST
control variable that:epytest
enable xdist with the usual set of parameters (provided that we're actually doing >1 job).distutils_enable_tests pytest
adddev-python/pytext-xdist
dep.Also add
EPYTEST_JOBS
to control jobs independently ofMAKEOPTS
.I suppose when this lands, we'd use a pkgcheck check for
EPYTEST_XDIST
being declared afterd_e_t
call.