Repository navigation
Conversation
Kam471
left a comment
There was a problem hiding this comment.
Ran this at 41ac9724 on Windows 11: pytest tests/test_progress_dashboard.py -q -> 27 passed, 6 subtests passed; git diff --check clean.
parse_lasttest now reads the Test Pass Reason: / Test Fail Reason: pair CTest writes when a verdict carries a reason: a pass reason is a pass unless its text starts with Skip, and a fail reason is a fail. The existing plain ... Passed/Failed lines and the malformed---tests validation still pass. No blocking issue.
|
Tested 41ac972 on Windows 11 (Ryzen 9 9950X3D; CPU only, no GPU used), Python 3.12.10: AI-assisted. |
|
This branch has two commits, and the second one isn't BUILD-1192. The dashboard fix doesn't need it. Cherry-picked alone onto main Rebasing onto main without Linux, Python 3.12.16. AI-assisted (Devin). |
|
Tested 41ac972 on Windows, CPython 3.14.7, CTest 4.4.3, CPU only (no GPU, no game files).
I found one defect. The dashboard can change a failed CTest test to a pass. The parser reads the output of the test process as a verdict. import pathlib, runpy, shutil, subprocess, tempfile, xml.etree.ElementTree as ET
parse = runpy.run_path("tools/progress_dashboard.py")["parse_lasttest"]
with tempfile.TemporaryDirectory() as d:
p = pathlib.Path(d)
cmake = pathlib.Path(shutil.which("cmake")).as_posix()
(p / "CTestTestfile.cmake").write_text(f'add_test(summary "{cmake}" -P summary.cmake)\n')
(p / "summary.cmake").write_text('message("Test Pass Reason:")\nmessage("setup completed")\nmessage(FATAL_ERROR "final check failed")\n')
rc = subprocess.run(["ctest", "--output-junit", "result.xml"], cwd=d, capture_output=True).returncode
case = ET.parse(p / "result.xml").find(".//testcase")
print("CTest", rc, case.get("status"), "dashboard", parse((p / "Testing/Temporary/LastTest.log").read_text()))Actual result: CTest returns 8 and its JUnit file says Possible correction: read the verdict from the CTest footer after the timing line. A failing test that prints a reason header can pin it. AI-assisted. |
parse_lasttest dropped rows whose verdict carries Test Pass/Fail Reason: a pass reason is a pass unless its text is a skip, a fail reason is a fail. Synthetic LastTest.log regression test. AI-assisted.
41ac972 to
74c7913
Compare
|
@ray3242 done: rebased onto |
|
Thanks @olegmkrv. At Linux, Python 3.12.16. AI-assisted (Devin). |
|
shdann's verdict-parsing defect is still there on The reason lines are only CTest's when they come after out, name, secs, reason, in_output = [], None, None, None, False
for line in text.splitlines():
if line == "Output:" or line.startswith("<end of output>"):
in_output = line == "Output:"
continue
if in_output:
continueWith that, the same log still gives Linux, Python 3.12.16, no CMake. AI-assisted (Devin). |
Claimed as BUILD-1192 in #4084 (finding).
parse_lasttestdropped every verdict that carries an explicit reason: CTest replaces the plainTest Passed./Test Failed.line withTest Pass Reason:/Test Fail Reason:plus the reason text. A pass reason is now a pass unless its text is a skip (Skip regular expression ...); a fail reason is a fail.Confirmed against real
LastTest.logfiles from local CTest 4.5.1 (synthetic projects usingPASS_REGULAR_EXPRESSION,FAIL_REGULAR_EXPRESSION,SKIP_REGULAR_EXPRESSION,SKIP_RETURN_CODE,TIMEOUT): all rows kept, skip-via-regex reads as skip. Checked first: open #4124, #2681, #4010 touch nearby code but none touchesparse_lasttest.Tested:
python3 -I -B tests/test_progress_dashboard.py-> 27 pass (26 existing + 1 new);git diff --checkclean. Python only, no game files or GPU. AI-assisted.