My app setup is similar to https://forums.developer.apple.com/thread/133495 - I have an app target, some frameworks and local Swift packages. I added the package tests to the test plan.
Now, when "gather code coverage" is just "on" in the test plan, I get code coverage from the package targets. But when I selectively add only the targets I want (including the package targets), the package targets don't show up in the code coverage results at all.
Gathering code coverage for all targets isn't really what I want, because that includes a lot of third-party code that I'm not interested in.