-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-108388: test_concurrent_futures requires cpu #108389
Conversation
The test_concurrent_futures and test_multiprocessing_spawn tests now require the 'cpu' resource. Skip these tests unless the 'cpu' resource is enabled (it is disabled by default). test_concurrent_futures is no longer skipped if Python is built with ASAN or MSAN sanitizer.
I already made the change for test_peg_generator and test_freeze in PR #108386, since it's less important to test the PEG generator and the freeze tool at each commit. Buildbots run these tests as post-commit (with the
On the other hand, Buildbots run test Python suite with See also the buildbot configuration: https://github.com/python/buildmaster-config/blob/main/master/custom/factories.py The following buildbot factories disable the
These factories enable it explicitly, even if it's already enabled by
There are other ways to run the Python test suite:
The Fedora package to build Python uses the |
Last year, issue #90682 discussed solutions to make the CI faster:
The issue title was "test_peg_generator takes 8 minutes on Windows" and it was closed when Gregory disabled compiler optimizations on Windows in test_peg_generator: the test takes 3-5 min instead of 5-16 min. |
Total test duration, before (PR #108386) => after (this PR):
The exact time depends if slowest tests are run first, since tests are randomized. Details of timing on this PR. Windows x86:
Windows x64:
macOS:
Ubuntu:
Address Sanitizer:
|
test_asyncio was actually splitted into sub-modules like |
See also #108421 which marks only the slowest tests, allowing faster tests to run. The running time of test_concurrent_futures was reduced from 2 min 26 sec to 1 min 20 sec. |
With them split up I don't believe we should do use "requires cpu" for concurrent_futures or multiprocessing. I rely on CI for testing of changes to things on most platforms. If github CI doesn't use -uall or -ucpu then I won't have a way to meaningfully test changes. |
Ok, I will continue in this way in this case. @serhiy-storchaka's PR #108421is more narrow and so skips less tests. |
The test_concurrent_futures and test_multiprocessing_spawn tests now require the 'cpu' resource. Skip these tests unless the 'cpu' resource is enabled (it is disabled by default).
test_concurrent_futures is no longer skipped if Python is built with ASAN or MSAN sanitizer.