Open raptorxcz opened 5 years ago
Resolved in PR https://github.com/yonaskolb/XcodeGen/pull/466
So I guess the issue was that the targets were in another project? Do you have multiple specs?
Oh, I forgot to mention, each framework have its own project. So the application project contains only application files. I wanted to run frameworks tests from different project.
Yes I see. Thanks for your PR. I’ll have a look over it in the next couple of days. I’ve just been taking some time off in the holidays
Hi @raptorxcz, are your projects in the same workspace? The plan is to add workspace support with multiple projects, with cross project dependencies (including tests)
Hi @yonaskolb, yes they are in same workspace. If you resolve this issue with another solution, I can close my MR. When I look at attached images, I think workspace is not required for this functionality.
I've been able to add multiple test targets to the main app scheme using the new projectReference
feature added in v 2.10. I think the ProjectSpec.md documentation doesn't make this clear. It says you can use a project reference for the coverageTargets
field, but doesn't mention that you can also use project references in the targets
field, but this works:
projectReferences:
MyGreatFramework:
path: Modules/Features/MyGreatFramework/MyGreatFramework.xcodeproj
schemes:
AwesomeApp-PROD:
build:
targets:
AwesomeApp: all
test:
targets:
- AwesomeAppTests
- MyGreatFramework/MyGreatFrameworkTests
gatherCoverageData: true
Hi,
I have Application with frameworks. Each framework has its own scheme and own unit tests. Application do not have its own unit tests, instead it runs all frameworks unit tests.
How do I achieve this behaviour in XcodeGen?
I tried set it in scheme, but it is not working.
For this settings I get error:
- Target "Application" scheme has invalid test "frameworkATests"
I would expect something like
implicit
keyword or path to the original project.