Skip to content

Enable testability if test discovery is enabled #2918

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

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

neonichu
Copy link
Contributor

This just makes XCBuild support match what we do in SwiftPM's own build
system here: https://github.com/apple/swift-package-manager/blob/master/Sources/XCBuildSupport/PIFBuilder.swift#L308

We should probably revisit this behaviour, because this seems like a
very confusing side effect on macOS where test discovery isn't even a
thing, but right now we just want to match what the builtin build system
does.

(cherry picked from commit 57f9d0d)

This just makes XCBuild support match what we do in SwiftPM's own build
system here: https://github.com/apple/swift-package-manager/blob/master/Sources/XCBuildSupport/PIFBuilder.swift#L308

We should probably revisit this behaviour, because this seems like a
very confusing side effect on macOS where test discovery isn't even a
thing, but right now we just want to match what the builtin build system
does.

(cherry picked from commit 57f9d0d)
@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor

Right, this does seem a bit odd. Is test discovery dependent on testability for technical reasons?

@neonichu
Copy link
Contributor Author

Is test discovery dependent on testability for technical reasons?

I guess so, but since it isn't actually used today on macOS, it probably shouldn't affect the build there.

It is also weird that this effectively means that bootstrap test --release builds everything twice, because the first swift build won't have testability enabled, so when we run swift test we will rebuild almost everything.

@shahmishal
Copy link
Member

Going to merge this to unblock master toolchain.

@shahmishal shahmishal merged commit 35df0c6 into swiftlang:master Sep 10, 2020
@neonichu neonichu deleted the xcbuild-enable-testability branch September 10, 2020 17:33
@neonichu neonichu mentioned this pull request Nov 16, 2020
2 tasks
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