Suppose I have a package containing two modules (A and B) and B depends on A. When refactoring the package, I'd like to modify and test A first and then work on B. To build my modification of A, I can use swift build --target A. However there isn't a similar command to only run A's test. I'm aware of swift test --filter option, but it apparently builds the entire package first. Does anyone know if it's possible to run A's test when B can't build? (it's OK if it's a Xcode specific command, though I doubt it).
My Scenario
I currently organize my app's code using multiple packages. The pros: when refactoring code, it's easy to work on each pacakge separately. The cons: since each package has its own git repository, it isn't possible to track the change of these packages (i.e. adding/deleting/renaming packages) using git. I considered two options: 1) putting all packages in a single repository, 2) using a single package and organzing the code using modules. I prefer the second option and hence the above question.
EDIT: I thought of an approach. I can modify package.swift file to comment out module B.