Skip to content

[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

Merged
merged 2 commits into from
Jun 3, 2016

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jun 3, 2016

What's in this pull request?

Replace subprocess.check_call with shell.capture in swift_build_support package.
This eliminates direct subprocess import. Currently, except for migration module.

Introduced optional parameter to shell.capture.


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

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

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@rintaro rintaro force-pushed the build-script-capture branch from 6f0e599 to 308160a Compare June 3, 2016 03:10
@rintaro
Copy link
Member Author

rintaro commented Jun 3, 2016

@swift-ci Please Python lint

@rintaro
Copy link
Member Author

rintaro commented Jun 3, 2016

@gribozavr @ddunbar Could we accept introducing optional parameter?

file=file)
version = shell.capture(
['xcodebuild', '-version'],
dry_run=False, echo=False, optional=True).rstrip()
Copy link
Contributor

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.

Copy link
Member Author

@rintaro rintaro Jun 3, 2016

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

@gribozavr
Copy link
Contributor

LGTM, optional makes a lot of sense, but I weakly disagree about two places where it is used. What do you think?

@gribozavr
Copy link
Contributor

@swift-ci Please test

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test OS X platform

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Jun 3, 2016

Hm, the change list in CI looks funny.
https://ci.swift.org/job/swift-PR-osx-smoke-test/410/
I will rebase and squash on newest master.

@gribozavr
Copy link
Contributor

The smoke tests are incremental, so we get a list of commits compared to the last smoke test that was run (which is irrelevant).

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test OS X platform

@rintaro
Copy link
Member Author

rintaro commented Jun 3, 2016

Ah, got it :)

@gribozavr gribozavr merged commit c3397f7 into swiftlang:master Jun 3, 2016
@rintaro rintaro deleted the build-script-capture branch June 4, 2016 13:45
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.

2 participants