Skip to content

microskills: read cargo nextest run as a test run - #379

Open
Lanre Shittu (Shizoqua) wants to merge 1 commit into
microsoft:mainfrom
Shizoqua:fix-microskills-cargo-nextest
Open

Lanre Shittu (Shizoqua) wants to merge 1 commit into
microsoft:mainfrom
Shizoqua:fix-microskills-cargo-nextest

Conversation

@Shizoqua

Copy link
Copy Markdown
Contributor

The observer read cargo nextest run as a call to the package tool cargo, while the loop guard counts it as a test run. cargo-nextest runs a Rust project's tests with cargo nextest run, or its visible alias cargo nextest r, so a nextest run never showed that its form works, and its form was pooled with every other cargo command's.

Fix: in the generic reading, cargo nextest run and cargo nextest r are a test run with the form cargo nextest run. Its summary (3 tests run: 3 passed, 0 skipped) already reads as tests that ran. cargo nextest list and archive, which run no tests, and the other cargo commands read as before, and the Python vocabulary is unchanged. Over the 5,974 strings in the test suites, none is classified differently.

Tests, in a new tests/test_observe_cargo_nextest.py:

  • cargo nextest run, its alias r, with options, a path to cargo or a cd, is a test run with its form, as the loop guard reads it (fail on main);
  • cargo nextest list, archive and show-config are not, and cargo test, cargo build and cargo add read as before;
  • a passing and a failing run's summary show the tests ran (fail on main), and a passing run shows its form works;
  • the Python vocabulary does not read cargo.
python -m pytest tests -n 4 --dist worksteal -rfEs --tb=line
1929 passed, 41 skipped

The skips need Windows, a real agent CLI (Codex, Hermes, opencode) or aider, or a non-root user.

Fixes #378

cargo-nextest runs a Rust project's tests with cargo nextest run, or its alias cargo nextest r.
The loop guard counts it as a test run, but the observer read it as a call to the package tool
cargo, so its runs never showed that the form works. It is now a test run with the form cargo
nextest run in the generic reading; its summary (N tests run: N passed, ...) already reads as
tests that ran. cargo nextest list and archive run no tests and read as before.
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.

microskills: cargo nextest run is observed as a call to cargo, not a test run

1 participant