Skip to content

Debug a test annotated with the ignore attribute if the test name partially matches another test - #43110

Merged
osiewicz merged 1 commit into
zed-industries:mainfrom
mikeHag:debug-exact-ignored-test
Dec 1, 2025
Merged

Debug a test annotated with the ignore attribute if the test name partially matches another test#43110
osiewicz merged 1 commit into
zed-industries:mainfrom
mikeHag:debug-exact-ignored-test

Conversation

@mikeHag

@mikeHag mikeHag commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

Related: #42574
If an integration test is annotated with the ignore attribute, allow the "debug: Test" option of the debug scenario or Code Action to run with the "--include-ignored" and "--exact" arguments. Inclusion of "--exact" covers the case where more that one test shares a base name. For example, consider two tests named "test_no_ace_in_middle_of_straight" and "test_no_ace_in_middle_of_straight_flush." Without the "--exact" argument both tests would run if a user attempts to debug "test_no_ace_in_middle_of_straight".

Release Notes:

  • Improved "debug test" experience in Rust with ignored tests.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Nov 20, 2025
@osiewicz
osiewicz enabled auto-merge (squash) November 24, 2025 12:30
@osiewicz
osiewicz disabled auto-merge November 24, 2025 12:30
@osiewicz
osiewicz merged commit 6eb9f9a into zed-industries:main Dec 1, 2025
53 of 57 checks passed
@franciskafyi franciskafyi moved this from Community PRs to Done in Quality Week – December 2025 Dec 11, 2025
someone13574 pushed a commit to someone13574/zed that referenced this pull request Dec 16, 2025
…tially matches another test (zed-industries#43110)

Related: zed-industries#42574
If an integration test is annotated with the ignore attribute, allow the
"debug: Test" option of the debug scenario or Code Action to run with
the "--include-ignored" and "--exact" arguments. Inclusion of "--exact"
covers the case where more that one test shares a base name. For
example, consider two tests named "test_no_ace_in_middle_of_straight"
and "test_no_ace_in_middle_of_straight_flush." Without the "--exact"
argument both tests would run if a user attempts to debug
"test_no_ace_in_middle_of_straight".

Release Notes:

- Improved "debug test" experience in Rust with ignored tests.
tomhoule added a commit that referenced this pull request May 20, 2026
Debugging a Rust test whose code lives in a nested module (e.g. `variant_get::test::get_complex_variant`) sometimes exited immediately with "0 tests matched", When the test name itself came from tree-sitter runnable capture, which sees only the bare function identifier. So `--exact get_complex_variant` filtered out the actual test.

The fix is to only append `--exact` when the name contains `::`. rust-analyzer's `experimental/runnables` produces qualified paths and keeps the #43110 disambiguation benefit, and the runnables from tree-sitter no longer break for nested modules.

Closes #51810.

Release Notes:

- Fixed debugging Rust tests in nested modules sometimes immediately exiting with "0 tests matched".
pull Bot pushed a commit to Zezo-Ai/zezo-ai that referenced this pull request Jun 10, 2026
…tries#54787)

Debugging an ignored Rust test whose code lives in a nested module (e.g.
`variant_get::test::get_complex_variant`) sometimes exited immediately
with "0 tests matched", When the test name itself came from tree-sitter
runnable capture, which sees only the bare function identifier. So
`--exact get_complex_variant` filtered out the actual test.

The fix is to only append `--exact` when the name contains `::`.
rust-analyzer's `experimental/runnables` produces qualified paths and
keeps the disambiguation introduced in zed-industries#43110, and the runnables from
tree-sitter no longer break for nested modules.

Closes zed-industries#51810.

Release Notes:

- Fixed debugging Rust tests in nested modules sometimes immediately
exiting with "0 tests matched".
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…tially matches another test (zed-industries#43110)

Related: zed-industries#42574
If an integration test is annotated with the ignore attribute, allow the
"debug: Test" option of the debug scenario or Code Action to run with
the "--include-ignored" and "--exact" arguments. Inclusion of "--exact"
covers the case where more that one test shares a base name. For
example, consider two tests named "test_no_ace_in_middle_of_straight"
and "test_no_ace_in_middle_of_straight_flush." Without the "--exact"
argument both tests would run if a user attempts to debug
"test_no_ace_in_middle_of_straight".

Release Notes:

- Improved "debug test" experience in Rust with ignored tests.
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…tries#54787)

Debugging an ignored Rust test whose code lives in a nested module (e.g.
`variant_get::test::get_complex_variant`) sometimes exited immediately
with "0 tests matched", When the test name itself came from tree-sitter
runnable capture, which sees only the bare function identifier. So
`--exact get_complex_variant` filtered out the actual test.

The fix is to only append `--exact` when the name contains `::`.
rust-analyzer's `experimental/runnables` produces qualified paths and
keeps the disambiguation introduced in zed-industries#43110, and the runnables from
tree-sitter no longer break for nested modules.

Closes zed-industries#51810.

Release Notes:

- Fixed debugging Rust tests in nested modules sometimes immediately
exiting with "0 tests matched".
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…tially matches another test (zed-industries#43110)

Related: zed-industries#42574
If an integration test is annotated with the ignore attribute, allow the
"debug: Test" option of the debug scenario or Code Action to run with
the "--include-ignored" and "--exact" arguments. Inclusion of "--exact"
covers the case where more that one test shares a base name. For
example, consider two tests named "test_no_ace_in_middle_of_straight"
and "test_no_ace_in_middle_of_straight_flush." Without the "--exact"
argument both tests would run if a user attempts to debug
"test_no_ace_in_middle_of_straight".

Release Notes:

- Improved "debug test" experience in Rust with ignored tests.
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…tries#54787)

Debugging an ignored Rust test whose code lives in a nested module (e.g.
`variant_get::test::get_complex_variant`) sometimes exited immediately
with "0 tests matched", When the test name itself came from tree-sitter
runnable capture, which sees only the bare function identifier. So
`--exact get_complex_variant` filtered out the actual test.

The fix is to only append `--exact` when the name contains `::`.
rust-analyzer's `experimental/runnables` produces qualified paths and
keeps the disambiguation introduced in zed-industries#43110, and the runnables from
tree-sitter no longer break for nested modules.

Closes zed-industries#51810.

Release Notes:

- Fixed debugging Rust tests in nested modules sometimes immediately
exiting with "0 tests matched".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

4 participants