Skip to content

[build-script] Use the correct build directory when building Darwin XCTest #2137

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
Apr 11, 2016

Conversation

briancroom
Copy link
Contributor

What's in this pull request?

Specify the XCTest build directory for both the SYMROOT and OBJROOT build settings when invoking xcodebuild. DSTROOT, which was previously being specified, is only used when performing an install action, which was disabled in #2036. With this change, all build intermediates and products end up in the correct XCTest build directory, with the system-wide DerivedData directory only receiving Xcode build logs.

This should resolve lingering issues related to leftover state from old builds causing CI failures. (See swiftlang/swift-corelibs-xctest#77 and swiftlang/swift-corelibs-xctest#95)

CC @modocache @shahmishal


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
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
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

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

@briancroom
Copy link
Contributor Author

Note: I just realized that I inadvertently pushed to branch to origin before making this PR, instead of to my fork. I realize this is against policy and will be more careful about doing this correctly in the future.

@rintaro
Copy link
Member

rintaro commented Apr 11, 2016

@briancroom @modocache
BTW, why not to make swift-corelibs-xctest/build_script.py to handle Darwin build too?
I think, that reduces repository dependency, and simplify build-script-impl.

@briancroom
Copy link
Contributor Author

Hey @rintaro, thanks for the feedback. I actually had the same thought while working on this, considering how much churn we've been introducing in the Swift build script around XCTest recently. In the past, there has been some hesitation to make the XCTest build script handle Darwin, however the intention this time around would be different, because we would be having the build script invoke xcodebuild, as Xcode is the only build tool we intend to support on Darwin. What do you think @modocache @mike-ferris-apple?

In the meantime, I would still like to see this PR merged as it should be the quickes let way to get XCTest CI working for OS X. Would someone mine kicking off a build? 🙏

@shahmishal
Copy link
Member

@swift-ci Please test

@modocache
Copy link
Contributor

I agree, after this much work it might be time to have build_script.py be the one-stop-shop for building corelibs-xctest, despite our initial reluctance. It's also a pain to send pull requests to apple/swift and hope they fix builds in apple/swift-corelibs-xctest.|

Thanks for continuing to work on this, @briancroom!! 🙇

@briancroom
Copy link
Contributor Author

Since CI is green here, I'm going io merge this so we can get some quick feedback on a couple of open XCTest PRs. Once we have the XCTest build script changes ready, I'll make an update here to utilize it. Thanks all!

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.

4 participants