Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix testing packages with multiple targets #19005

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

duncanawoods
Copy link

@duncanawoods duncanawoods commented Jan 22, 2025

This PR fixes #18955 and other bugs related to RA executing the wrong test and/or assigning results incorrectly.

It makes test execution aware of the difference between packages and targets.

It removes the need to use hack_recover_crate_name to match test output to tests.

  • request::handle_run_test
    • no longer tries (and fails) to reduce a list of tests to a single pattern
  • test_runner::CargoTestHandle
    • no longer runs patterns against the workspace and now always runs tests in the correct target
  • CargoActor
    • is extended to take a parser that has the required context for parsing tool output correctly
  • main_loop
    • every CargoTestMessage in the event queue now contains the required information to assign to correct test

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 22, 2025
fix test running by invoking cargo per package

remove hack_recover_crate_name
@duncanawoods duncanawoods force-pushed the 18955---fix-running-tests-for-packages-with-multiple-targets branch from d1acee6 to 9e4161c Compare January 22, 2025 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VSCode Test Explorer - bugs running tests for packages with multiple targets
2 participants