-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[build-script] Consistent use of shell.capture in swift_build_support #2858
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
Conversation
Eliminate direct `import subprocess`.
6f0e599
to
308160a
Compare
@swift-ci Please Python lint |
@gribozavr @ddunbar Could we accept introducing |
file=file) | ||
version = shell.capture( | ||
['xcodebuild', '-version'], | ||
dry_run=False, echo=False, optional=True).rstrip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather we stop right here if the command fails. If xcodebuild
is not there, we're in trouble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
Moreover, we need non-Darwin version of --show-sdks
implementation.
In this PR, I will just omit , optional=True
LGTM, |
@swift-ci Please test |
@swift-ci Please smoke test |
@swift-ci Please smoke test OS X platform |
@swift-ci Please smoke test |
Hm, the change list in CI looks funny. |
The smoke tests are incremental, so we get a list of commits compared to the last smoke test that was run (which is irrelevant). |
@swift-ci Please smoke test OS X platform |
Ah, got it :) |
What's in this pull request?
Replace
subprocess.check_call
withshell.capture
inswift_build_support
package.This eliminates direct
subprocess
import. Currently, except formigration
module.Introduced
optional
parameter toshell.capture
.Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.