mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:30:52 +01:00
[PR #1256] progress_dashboard: recover parse_lasttest after incomplete nested CTest logs (DASH-CTEST-INCOMPLETE-NESTED) #1288
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1288
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1256
Author: @IlyassRS3
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:fix/dash-ctest-incomplete-nested📝 Commits (3)
f482408progress_dashboard: recover parse_lasttest after incomplete nested CTest logs8d2aa7bprogress_dashboard: avoid O(n^2) suffix copy in _trailer_end_time_matchesc81b2daprogress_dashboard: unwind multi-level truncated nested CTest outputs by trailer name📊 Changes
2 files changed (+190 additions, -9 deletions)
View changed files
📝
tests/test_progress_dashboard.py(+126 -0)📝
tools/progress_dashboard.py(+64 -9)📄 Description
What changed
Fixes
parse_lasttestintools/progress_dashboard.pyso an incomplete nested CTest log inside a test's capturedOutput:block (such as a nested run missing its trailingEnd testing:line, or truncated mid-output) no longer swallows the outer test's verdict and all subsequent outer test results.Addresses the findings in #14 (finding #7143409370 and the real CTest 3.31.10 fixture in finding #7144069427).
Why this works even when inner and outer share name, ordinal, and timestamps
In CTest
LastTest.log, every test output inside a nested run is bracketed byOutput:+ 58 dashes and<end of output>+Test time =. Instead of a flatnested_runscounter that can only close onEnd testing:,parse_lasttestnow tracks a stack of[in_output, inner_test_name]frames for each nestedStart testing:+ 58-dash block:Output:+ 58 dashes setsin_output = Truefor the innermost nested run, and the inner test's<end of output>flips it back toFalsewhile staying inside outer capture (so innerwrapperpass verdicts are still ignored even when name, ordinal, and timestamps match the outer test).<end of output>+Test time =arrives within_output == Falseon the top nested frame(s), no innerOutput:block is open, so those completed-but-unclosed nested runs (missingEnd testing:) are popped cleanly; if the stack empties, outer capture ends immediately, and in 3-level nesting an enclosing middle test'sOutput:closes while staying inside outer capture.Output:before its own<end of output>,_trailer_end_time_matcheschecks the immediate"<name>" end time:trailer (stopping at the first end-time line or second 58-dash separator) to resynchronize on the outer test.End testing:lines printed inside a nested test's capturedOutput:are ignored whilein_outputisTrue, preventing premature exit from outer capture.Tests added (
tests/test_progress_dashboard.py)test_lasttest_recovers_when_nested_log_omits_end_testing(reproduces the real CTest 3.31.10 fixture: outerwrapper1/2 fails, innerwrapper1/2 passes +child_22/2 passes with identical timestamps and missingEnd testing:, followed by outerlater2/2 passing).test_lasttest_recovers_from_empty_incomplete_nested_log(reproduces finding #7143409370).test_lasttest_handles_three_level_nested_log_missing_innermost_end_testing.test_lasttest_recovers_when_inner_test_output_is_truncated_mid_stream.test_lasttest_ignores_spurious_end_testing_inside_nested_test_output.Item ID
DASH-CTEST-INCOMPLETE-NESTEDVerification
Tested on macOS 27.2.1 (Apple M5 arm64), Python 3.14 (no game files, no GPU, standard library only):
python3 -I tests/test_progress_dashboard.py -v-> 56/56 OKtools/progress_dashboard.pytoupstream/mainwhile keepingtests/test_progress_dashboard.py) -> FAILED (5 failures): all 5 new tests fail onmain(4 return[], 1 falsely reports('wrapper', 'pass', 0.01)instead of('wrapper', 'fail', 0.15)); restoring the fix returns to 56/56 OK.python3 -m compileall -q tools/progress_dashboard.py tests/test_progress_dashboard.py-> OKpython3 -I scripts/check_no_game_data.py tools/progress_dashboard.py tests/test_progress_dashboard.py-> OKpython3 -I tests/test_ci_registration.py-> 15/15 OKpython3 -I tests/test_text_write_line_endings.py-> 3/3 OKChecklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.