docs: preserve CTest skips in dashboard reports (DOC-DASH-CTEST-JUNIT) #965

Manually merged
github merged 2 commits from gh-pr/965/head into gh-pr/965/base 2026-11-26 09:30:48 +00:00
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 15:58 UTC · original
TheGeogeo:docs/dashboard-ctest-junit → main · +15 −0 · 1 files · 2 commits · merged 2026-11-25 21:26 UTC

Claimed in the coordination issue as: DOC-DASH-CTEST-JUNIT

What and why

Document the --ctest-junit workflow for dashboard runs where CTest tests may use SKIP_RETURN_CODE. In a synthetic run on CTest 4.3.1-msvc1, LastTest.log marked an exit-77 skip as Test Passed. while the JUnit report retained the skipped status. The example shows how to generate and prefer that JUnit report and explains that --junit adds independent runs. It merges with the separate table changes in #757 (merged since).

a7eb8782 applies the review suggestion: each run writes its report to a new file name, and the example stops with an error when CTest wrote no report. With the fixed path, an aborted run (for example a missing build directory) left the previous report in place, and the dashboard recorded those older results again.

Tested

Head a7eb8782 (two commits on main 1504c1af); it merges cleanly with main 6fe83805. Windows 11, Python 3.12.4:

  • Synthetic CTest project, CTest 4.3.1, PowerShell 7.6.10. With the previous example, after a passing run, a second run with a missing build directory made CTest exit 1 and the dashboard exit 0 with the previous result. With the new example, the missing directory throws and no snapshot is written; a failing test (CTest exit 8) is recorded as failed, the passing test stays verified and the exit-77 test stays unknown. Reproduced again on the same head in a later check.
  • python -I -B tests/test_progress_dashboard.py: 50 passed; all tests/test_docs_*.py passed; git diff --check and python -I -B scripts/check_no_game_data.py docs/progress_dashboard.md: clean.
  • Merged with main 6261ca91: tests/test_progress_dashboard.py 51 passed. Merged with main 6fe83805: tests/test_progress_dashboard.py 51 passed, the 47 tests of tests/test_docs_*.py passed, and test_tool_stdout_encoding.py and test_text_write_line_endings.py passed.

Earlier head a83f0c3e:

  • Windows, Python 3.12.4 and CTest 4.3.1-msvc1. A synthetic CTest suite with one pass and one exit-77 skip produced a dashboard showing verified and unknown, respectively, through --ctest-junit.
  • python -I -B tests/test_progress_dashboard.py: 50 passed.
  • python -I -B tests/test_docs_links.py: 16 passed.
  • python -I -B tests/test_docs_cli_flags.py: 4 passed.
  • git diff --check and python -I -B scripts/check_no_game_data.py docs/progress_dashboard.md: passed.
  • Isolated merge with #757 (92152f3f): no conflicts.

GPUs tested: n/a. Synthetic CPU-only tests.

AI-assisted: yes (Codex; a7eb8782 with Claude Code).

Checklist

  • Based on current main.
  • One topic.
  • No game data, keys, or decryption.
  • Translator contract entry: not applicable.
**@⁠TheGeogeo** on GitHub · 2026-11-24 15:58 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/965) `TheGeogeo:docs/dashboard-ctest-junit` → `main` · +15 −0 · 1 files · 2 commits · merged 2026-11-25 21:26 UTC Claimed in the coordination issue as: [DOC-DASH-CTEST-JUNIT](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why Document the `--ctest-junit` workflow for dashboard runs where CTest tests may use `SKIP_RETURN_CODE`. In a synthetic run on CTest 4.3.1-msvc1, `LastTest.log` marked an exit-77 skip as `Test Passed.` while the JUnit report retained the skipped status. The example shows how to generate and prefer that JUnit report and explains that `--junit` adds independent runs. It merges with the separate table changes in #757 (merged since). `a7eb8782` applies the [review suggestion](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/965): each run writes its report to a new file name, and the example stops with an error when CTest wrote no report. With the fixed path, an aborted run (for example a missing build directory) left the previous report in place, and the dashboard recorded those older results again. ### Tested Head `a7eb8782` (two commits on `main` `1504c1af`); it merges cleanly with `main` `6fe83805`. Windows 11, Python 3.12.4: - Synthetic CTest project, CTest 4.3.1, PowerShell 7.6.10. With the previous example, after a passing run, a second run with a missing build directory made CTest exit 1 and the dashboard exit 0 with the previous result. With the new example, the missing directory throws and no snapshot is written; a failing test (CTest exit 8) is recorded as `failed`, the passing test stays `verified` and the exit-77 test stays `unknown`. Reproduced again on the same head in a later check. - `python -I -B tests/test_progress_dashboard.py`: 50 passed; all `tests/test_docs_*.py` passed; `git diff --check` and `python -I -B scripts/check_no_game_data.py docs/progress_dashboard.md`: clean. - Merged with `main` `6261ca91`: `tests/test_progress_dashboard.py` 51 passed. Merged with `main` `6fe83805`: `tests/test_progress_dashboard.py` 51 passed, the 47 tests of `tests/test_docs_*.py` passed, and `test_tool_stdout_encoding.py` and `test_text_write_line_endings.py` passed. Earlier head `a83f0c3e`: - Windows, Python 3.12.4 and CTest 4.3.1-msvc1. A synthetic CTest suite with one pass and one exit-77 skip produced a dashboard showing `verified` and `unknown`, respectively, through `--ctest-junit`. - `python -I -B tests/test_progress_dashboard.py`: 50 passed. - `python -I -B tests/test_docs_links.py`: 16 passed. - `python -I -B tests/test_docs_cli_flags.py`: 4 passed. - `git diff --check` and `python -I -B scripts/check_no_game_data.py docs/progress_dashboard.md`: passed. - Isolated merge with #757 (`92152f3f`): no conflicts. GPUs tested: n/a. Synthetic CPU-only tests. AI-assisted: yes (Codex; `a7eb8782` with Claude Code). ### Checklist - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys, or decryption. - Translator contract entry: not applicable.
With a fixed path, an aborted CTest run left the previous report in place and the dashboard recorded it again.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:30:47 +00:00
github manually merged commit a7eb878251 into gh-pr/965/base 2026-11-26 09:30:48 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 16:05 UTC · original · approved these changes

Verified the submitted head a83f0c3e14842adbc565b30f1b3fb9eccd7b44ec. On the Linux host, the dashboard suite passed 50/50, docs link checks 16/16, CLI docs checks 4/4, plus the no-game-data and diff checks. I also reproduced the documented behavior in an isolated Fedora 45 container with CMake/CTest 4.3: a synthetic SKIP_RETURN_CODE 77 test is reported as skipped by CTest, parsed from --output-junit as skip, and the dashboard command completed with the supplied --ctest-junit report. No game data or GPU used.

**@⁠KernelSmoker** on GitHub · 2026-11-24 16:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/965#pullrequestreview-6042870629) · **approved these changes** Verified the submitted head `a83f0c3e14842adbc565b30f1b3fb9eccd7b44ec`. On the Linux host, the dashboard suite passed 50/50, docs link checks 16/16, CLI docs checks 4/4, plus the no-game-data and diff checks. I also reproduced the documented behavior in an isolated Fedora 45 container with CMake/CTest 4.3: a synthetic `SKIP_RETURN_CODE 77` test is reported as skipped by CTest, parsed from `--output-junit` as `skip`, and the dashboard command completed with the supplied `--ctest-junit` report. No game data or GPU used.
Author
Owner

@⁠xel1uz on GitHub · 2026-11-24 20:21 UTC · original
On docs/progress_dashboard.md line 23 (outdated):

@@ -13,6 +13,16 @@ start ..\leonida_progress\progress.html
 The page is one self-contained HTML file: no network, no packages, it opens from disk. The project logo
 (`assets/logo.png`) is embedded in it, and the page follows the system theme until you pick one with its theme button.
 
+Use a CTest JUnit report when the run includes tests configured with `SKIP_RETURN_CODE`. CTest can log those
+skips as `Test Passed.` in `LastTest.log`. `--ctest-junit` replaces the local log with the report, which preserves
+the skipped status. Use `--junit` to add independent runs.
+
+```powershell
+$report = Join-Path $env:TEMP 'leonida-ctest.xml'
+ctest --test-dir runtime/build -C RelWithDebInfo --output-on-failure --output-junit $report
+python -I tools/progress_dashboard.py --out ..\leonida_progress --ctest-junit $report

I reproduced a stale-result case on Windows (CTest 4.4.3, PowerShell 7.6.9). After a successful run writes the fixed XML path, run the example again with a missing build directory. CTest exits 1 and leaves the old XML untouched. The dashboard then exits 0 and records the previous passing test as verified.

Using a fresh filename lets the example distinguish an aborted run from a completed run with failing tests. I tested the suggested block in both cases: a missing directory produced no snapshot, while a real failing fixture (CTest exit 8) still appeared as failed. A passing fixture and an exit-77 skip kept their expected statuses. The 50 dashboard and 20 documentation tests passed. AI-assisted reproduction and review.

$report = Join-Path $env:TEMP ("leonida-ctest-{0}.xml" -f [guid]::NewGuid())
ctest --test-dir runtime/build -C RelWithDebInfo --output-on-failure --output-junit $report
if (Test-Path -LiteralPath $report -PathType Leaf) {
    python -I tools/progress_dashboard.py --out ..\leonida_progress --ctest-junit $report
} else {
    throw "CTest did not produce a JUnit report (exit $LASTEXITCODE)."
}
**@⁠xel1uz** on GitHub · 2026-11-24 20:21 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/965#discussion_r4686020290) On `docs/progress_dashboard.md` line 23 (outdated): ```diff @@ -13,6 +13,16 @@ start ..\leonida_progress\progress.html The page is one self-contained HTML file: no network, no packages, it opens from disk. The project logo (`assets/logo.png`) is embedded in it, and the page follows the system theme until you pick one with its theme button. +Use a CTest JUnit report when the run includes tests configured with `SKIP_RETURN_CODE`. CTest can log those +skips as `Test Passed.` in `LastTest.log`. `--ctest-junit` replaces the local log with the report, which preserves +the skipped status. Use `--junit` to add independent runs. + +```powershell +$report = Join-Path $env:TEMP 'leonida-ctest.xml' +ctest --test-dir runtime/build -C RelWithDebInfo --output-on-failure --output-junit $report +python -I tools/progress_dashboard.py --out ..\leonida_progress --ctest-junit $report ``` I reproduced a stale-result case on Windows (CTest 4.4.3, PowerShell 7.6.9). After a successful run writes the fixed XML path, run the example again with a missing build directory. CTest exits 1 and leaves the old XML untouched. The dashboard then exits 0 and records the previous passing test as verified. Using a fresh filename lets the example distinguish an aborted run from a completed run with failing tests. I tested the suggested block in both cases: a missing directory produced no snapshot, while a real failing fixture (CTest exit 8) still appeared as failed. A passing fixture and an exit-77 skip kept their expected statuses. The 50 dashboard and 20 documentation tests passed. AI-assisted reproduction and review. ```suggestion $report = Join-Path $env:TEMP ("leonida-ctest-{0}.xml" -f [guid]::NewGuid()) ctest --test-dir runtime/build -C RelWithDebInfo --output-on-failure --output-junit $report if (Test-Path -LiteralPath $report -PathType Leaf) { python -I tools/progress_dashboard.py --out ..\leonida_progress --ctest-junit $report } else { throw "CTest did not produce a JUnit report (exit $LASTEXITCODE)." } ```
Author
Owner

@⁠TheGeogeo on GitHub · 2026-11-24 20:52 UTC · original
On docs/progress_dashboard.md line 23 (outdated):

@@ -13,6 +13,16 @@ start ..\leonida_progress\progress.html
 The page is one self-contained HTML file: no network, no packages, it opens from disk. The project logo
 (`assets/logo.png`) is embedded in it, and the page follows the system theme until you pick one with its theme button.
 
+Use a CTest JUnit report when the run includes tests configured with `SKIP_RETURN_CODE`. CTest can log those
+skips as `Test Passed.` in `LastTest.log`. `--ctest-junit` replaces the local log with the report, which preserves
+the skipped status. Use `--junit` to add independent runs.
+
+```powershell
+$report = Join-Path $env:TEMP 'leonida-ctest.xml'
+ctest --test-dir runtime/build -C RelWithDebInfo --output-on-failure --output-junit $report
+python -I tools/progress_dashboard.py --out ..\leonida_progress --ctest-junit $report

Thanks, reproduced on Windows 11 (CTest 4.3.1, PowerShell 7.6.10) with a synthetic CTest project and applied in a7eb8782, with a sentence on why the name changes for each run.

  • Before: after a passing run, the block with a missing build directory made CTest exit 1 and the dashboard exit 0 with the previous result.
  • After: the missing directory throws and writes no snapshot; a failing test (CTest exit 8) is recorded as failed; the passing test stays verified, and the exit-77 test keeps the unknown status it had with the previous block.
  • All tests/test_docs_*.py files and tests/test_progress_dashboard.py (50) pass, data guard and git diff --check clean.

AI-assisted: yes (Claude Code).

**@⁠TheGeogeo** on GitHub · 2026-11-24 20:52 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/965#discussion_r4686388478) On `docs/progress_dashboard.md` line 23 (outdated): ```diff @@ -13,6 +13,16 @@ start ..\leonida_progress\progress.html The page is one self-contained HTML file: no network, no packages, it opens from disk. The project logo (`assets/logo.png`) is embedded in it, and the page follows the system theme until you pick one with its theme button. +Use a CTest JUnit report when the run includes tests configured with `SKIP_RETURN_CODE`. CTest can log those +skips as `Test Passed.` in `LastTest.log`. `--ctest-junit` replaces the local log with the report, which preserves +the skipped status. Use `--junit` to add independent runs. + +```powershell +$report = Join-Path $env:TEMP 'leonida-ctest.xml' +ctest --test-dir runtime/build -C RelWithDebInfo --output-on-failure --output-junit $report +python -I tools/progress_dashboard.py --out ..\leonida_progress --ctest-junit $report ``` Thanks, reproduced on Windows 11 (CTest 4.3.1, PowerShell 7.6.10) with a synthetic CTest project and applied in `a7eb8782`, with a sentence on why the name changes for each run. - Before: after a passing run, the block with a missing build directory made CTest exit 1 and the dashboard exit 0 with the previous result. - After: the missing directory throws and writes no snapshot; a failing test (CTest exit 8) is recorded as `failed`; the passing test stays `verified`, and the exit-77 test keeps the `unknown` status it had with the previous block. - All `tests/test_docs_*.py` files and `tests/test_progress_dashboard.py` (50) pass, data guard and `git diff --check` clean. AI-assisted: yes (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
No description provided.