bpo-37667: Only setup PGO tests when PGO is actually enabled. by gpshead · Pull Request #14927 · python/cpython (original) (raw)
I think it is the correct fix. It is exactly what I had in my tree before I realized you already fixed it. Initially I had the "if ns.pgo" test inside the setup_pgo_tests(). However, I decided that makes the call in main.py a bit confusing since it looks like something gets done in the non-PGO case. So, I removed the test from setup_pgo_tests() but then I forget to add it to main.py. So, your fix makes the code the way I intended it.
I should have run the test suite after the refactoring. My testing consisted of running the build using "--enable-optimizations" and "--enable-optimzations PROFILE=TASK=...". I forget to run the normal test suite. No major harm done but kind of embarrassing. 😁