Improve C++ test infrastructure: progress reporter, timeouts, and skip hanging Move Subinterpreter test #5942
+184
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR improves the C++ test infrastructure to provide better visibility into test execution and prevent CI hangs from going undiagnosed.
Changes
Test timeouts:
timeout-minutes: 3to allcppteststeps in CI workflows (18 total)Unbuffered output:
USES_TERMINALtoadd_custom_targetcommands in CMakeLists.txt files to prevent ninja from buffering test output (critical for diagnosing hangs)Progress reporter (
catch.cpp):ProgressReporterthat prints[ RUN ],[ OK ],[ FAILED ]for each test[ STARTING ]and[ DONE ]timestamps with UTC timeSIGTERMsignal handler to print[ SIGNAL ]when tests are killed by timeoutSkip macro:
PYBIND11_CATCH2_SKIP_IFmacro for runtime test skipping with visible output (Catch2 v2 doesn't have native skip support)Example output:
Background
We were in the dark for months about which test was hanging on free-threaded Python 3.14 because:
This PR ensures that future hangs will be immediately diagnosable from CI logs.
Related
gil_safe_call_once_and_store#5933