Skip to content

Gate CI on doctest's JUnit report instead of scraping stdout - #80

Merged
viniciusferrao merged 1 commit into
masterfrom
fix/ci-doctest-junit
Aug 16, 2026
Merged

viniciusferrao merged 1 commit into
masterfrom
fix/ci-doctest-junit

Conversation

@viniciusferrao

Copy link
Copy Markdown
Member

The preflight and per-distro build scripts grepped the human-oriented [doctest] assertions: console line, which is not a stable interface across doctest versions.

  • New ci/check-doctest-junit.sh: reruns the test binary with doctest's machine-readable JUnit reporter and parses the XML with python3. JUnit natively separates assertion failures (<failure>) from test cases aborted by environment exceptions (<error>), so the long-standing container policy carries over exactly: failures gate, environment errors are tolerated and reported. Empty or unreadable reports fail loudly.
  • ctest still runs the full suite first for console diagnostics and the shell-based CLI tests; its exit code stays informational.
  • doctest floor raised to 2.4.11: older JUnit reporters omit FAIL() from failure counts (DOCTEST_FAIL does not mark test as failed in junit report. doctest/doctest#755), which would false-green the gate (Codex review catch; the current lock resolves 2.4.12, so no version churn).

Validated end to end in the almalinux:10 preflight container: the new gate ran against the real suite and reported 1265 reported test(s), 0 assertion failure(s), 1 environment error(s) tolerated, exit 0. The missing-report and injected-failure paths were exercised manually and both fail the gate. Codex review: clean.

Fixes #60

The preflight and per-distro build scripts grepped the human-oriented
"[doctest] assertions:" console summary, which is not a stable interface
across doctest versions. Add ci/check-doctest-junit.sh: rerun the test
binary with doctest's machine-readable JUnit reporter and parse the XML
with python3. JUnit separates assertion failures (<failure>) from test
cases aborted by environment exceptions (<error>), so the long-standing
container policy carries over: failures gate, environment errors are
tolerated and reported. An empty or unreadable report fails loudly.

ctest still runs the full suite first for console diagnostics and the
shell-based CLI tests; its exit code stays informational.

Fixes #60
@viniciusferrao
viniciusferrao merged commit 1aa428c into master Aug 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI test parsing depends on doctest stdout format

1 participant