Skip to content

[swift-test] [BLOCKED by #143] Disambiguate Package.test targets #213

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

Closed
wants to merge 1 commit into from
Closed

[swift-test] [BLOCKED by #143] Disambiguate Package.test targets #213

wants to merge 1 commit into from

Conversation

czechboy0
Copy link
Member

This tries to solve the same problem as #151.

This seems to work on OS X, I'm in the process of testing it on Linux.

! I need guidance on what the best way to pull the root package's name is. Currently I'm using the root folder's name, which of course isn't robust at all.

This aims to fix https://bugs.swift.org/browse/SR-989

@@ -21,11 +21,14 @@ do {
usage()
case .Run(let xctestArg):
let dir = try directories()

//FIXME find a reliable name to detect the name of the root test Package
let testPackageName = dir.root.basename
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm all ears on how to pull the root package's name. We can always reparse the manifest, but for now it feels like an overkill. @mxcl?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine to reparse it for now. Premature optimization and all that.

@kostiakoval
Copy link
Contributor

We should add a Unit tests for it.
Test-case: An app that depend on 2 packages with Tests. The app should build and run tests correctly.

@czechboy0
Copy link
Member Author

@kostiakoval You're absolutely right, I'll add that. I just wanted to fix the root package name detection before I do so.

@kostiakoval
Copy link
Contributor

@czechboy0 I've provided example project in the SR-989 that you could use for testing

@czechboy0
Copy link
Member Author

Ha, I knew I remembered this being fixed months ago. There actually is a test for this case, but previously swift build was failing, so this test only tries to build the hierarchy. But now swift test is failing, so what I'll do is add a way to verify that swift test also works (doesn't exist yet), but there's no need to add a new test fixture. So this is really a finish of a fix of SR-820.

@czechboy0 czechboy0 changed the title [swift-test] Disambiguate Package.test targets [swift-test] [WIP] Disambiguate Package.test targets Mar 21, 2016
@kostiakoval
Copy link
Contributor

I think this PR dependent on #143 because you would need to invoke swift-test.

@czechboy0
Copy link
Member Author

@kostiakoval You're right! Waiting for #143 here then.

@czechboy0 czechboy0 changed the title [swift-test] [WIP] Disambiguate Package.test targets [swift-test] [BLOCKED by #143] Disambiguate Package.test targets Apr 2, 2016
@mxcl
Copy link
Contributor

mxcl commented Apr 2, 2016

Merged: e702428

@mxcl mxcl closed this Apr 2, 2016
aciidgh pushed a commit to aciidgh/swift-package-manager that referenced this pull request Jan 11, 2019
<rdar://problem/36587411> Better error-handling for single node builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants