Skip to content

Conversation

gribozavr
Copy link
Contributor

Under certain obscure circumstances (incomplete SDKs), xcodebuild can
successfully work with the SDK and print its version number, but will
still exit with a non-zero code. This change works around the issue by
ignoring the exit code.


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.

@@ -30,7 +30,8 @@ def print_xcodebuild_versions(file=sys.stdout):
version = shell.capture(
['xcodebuild', '-version'], dry_run=False, echo=False).rstrip()
sdks = shell.capture(
['xcodebuild', '-version', '-sdk'], dry_run=False, echo=False).rstrip()
['xcodebuild', '-version', '-sdk'], dry_run=False, echo=False,
allow_non_zero_exit=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.

Probably a good idea to have a comment here explaining why this is necessary, so someone doesn't accidentally remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

@ddunbar
Copy link
Contributor

ddunbar commented Jun 3, 2016

LGTM

Under certain obscure circumstances (incomplete SDKs), xcodebuild can
successfully work with the SDK and print its version number, but will
still exit with a non-zero code.  This change works around the issue by
ignoring the exit code.
@gribozavr gribozavr force-pushed the build-script-allow-non-zero-xcodebuild-sdk-version branch from 445f371 to c55e89f Compare June 3, 2016 22:50
@gribozavr
Copy link
Contributor Author

@swift-ci Please smoke test

@gribozavr gribozavr merged commit 07d0a62 into master Jun 4, 2016
@gribozavr gribozavr deleted the build-script-allow-non-zero-xcodebuild-sdk-version branch June 4, 2016 01:03
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