swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.2k stars 264 forks source link

Prepend module name to TestItem IDs #1530

Closed plemarquand closed 2 days ago

plemarquand commented 6 days ago

It is possible to have two identically named suites in two different test targets. These were being erroniously rolled up in to the same parent TestItem.

Disambiguate these TestItems by prepending the module name. This has the added benefit of making the TestItem IDs a fully qualified name that can be passed to swift test.

The module name is pulled from the compiler arguments for the target. If no module name can be found we fall back to the targetID for the ConfiguredTarget.

ahoppen commented 5 days ago

@swift-ci Please test

ahoppen commented 5 days ago

@plemarquand Could you also create a cherry-pick PR for this change to release/6.0? https://github.com/swiftlang/sourcekit-lsp/blob/main/CONTRIBUTING.md#opening-a-pr-for-release-branch

ahoppen commented 2 days ago

@swift-ci Please test

ahoppen commented 2 days ago

@swift-ci Please test Windows