ReviewOS

zig-utils/zig-test-framework

Wire discovery mode through all advertised CLI options

#2
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Problem

Discovery mode parses and accepts many CLI options, but most are not applied when test files are executed. The loader currently invokes only zig test <file>, so behavior differs substantially from programmatic mode.

Affected options include filtering, reporter selection, quiet and color modes, timeout, parallel jobs, snapshot updates, memory profiling, JUnit output, and configuration files.

Proposed work

  • Define which options are supported for discovered Zig tests.
  • Pass supported filtering and execution options to the child test command.
  • Route discovered-test results through the selected reporter.
  • Apply timeout, snapshot, memory, and JUnit settings where relevant.
  • Return a clear error for any option that cannot be supported instead of silently ignoring it.
  • Add end-to-end CLI tests covering the supported combinations.

Acceptance criteria

  • Every option shown by zig-test --help either changes discovery behavior or produces an explicit unsupported-option error.
  • Discovery and programmatic modes have documented behavior differences.
  • End-to-end tests cover filtering, reporter selection, timeout, and parallel execution.

Sign in to comment on this issue.