Skip to content

fix: enforce bounded parallel test execution - #21

Merged
glennmichael123 merged 2 commits into
mainfrom
codex/issue-15-bounded-parallel
Sep 29, 2026
Merged

glennmichael123 merged 2 commits into
mainfrom
codex/issue-15-bounded-parallel

Conversation

@glennmichael123

Copy link
Copy Markdown
Contributor

Closes #15.

Replaces one-thread-per-test execution with a bounded scheduler. n_jobs is now an exact concurrency ceiling; omitting it uses the logical CPU count with a one-worker fallback. Suites and nested suites run in declaration order, direct tests run concurrently, and inherited per-test hooks execute on the same worker as their test.

Reporter calls are serialized and results are emitted in declaration order. Nested totals, failure propagation, filters, skips, only-selection, and lifecycle hooks are all handled by the parallel path, while duplicate runner/reporter start/end events are removed.

Tests verify one-worker, two-worker, and CPU-default limits; deterministic event order and totals; pass/fail/skip propagation; and nested hook lifecycle behavior. The thread-safety and hook semantics are documented.

This PR is stacked on #20 so its diff stays scoped to issue #15. Merge #20 first, then retarget this PR to main.

Verification:

  • zig build test repeated three times
  • zig fmt --check .
  • zig build
  • zig build examples
  • zig build -Dtarget=x86_64-linux-gnu

@glennmichael123
glennmichael123 changed the base branch from codex/issue-13-version to main September 29, 2026 16:12
@glennmichael123
glennmichael123 force-pushed the codex/issue-15-bounded-parallel branch from 776c199 to 5ad9913 Compare September 29, 2026 16:12
@glennmichael123
glennmichael123 merged commit 5c0277a into main Sep 29, 2026
6 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.

Honor --jobs with a bounded parallel executor

1 participant