Description
Bug report
Bug description:
As part of a PGO-optimised build, a selection of tests are run in order for the PGO build to take place (if I understand correctly, these tests are used to gather data on which functions in Python are performance-critical and should be optimised). Exactly which tests are run is hardcoded here:
cpython/Lib/test/libregrtest/pgo.py
Lines 1 to 51 in bb2e96f
test_unicode
is specified as one of the tests to be run as part of this selection. However, test_unicode
always fails during a PGO build. Why? Because it was renamed as test_str
in #13172 (by @asqui). This hasn't been noticed until now because the PGO build is still marked as a "success" even if some tests fail during the analysis phase.
The fix for the immediate issue is simple: don't try to run test_unicode
as part of the PGO-optimised build (it doesn't exist anymore); run test_str
instead. Longer term, though, we might want to look at making the PGO build fail if it tries to run nonexistent tests. It's probably correct for the build to continue even if some tests fail during the analysis phase, but perhaps we could make an exception for this specific kind of failure (attempting to run nonexistent tests).
Cc. @hugovk as the primary reviewer for #13172, and @vstinner as a libregrtest expert.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows