-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[build-script] Move HostSpecificConfiguration out of main script. #23988
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
[build-script] Move HostSpecificConfiguration out of main script. #23988
Conversation
56a575e
to
cb924f9
Compare
@swift-ci please test |
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.
AIUI, this is just moving the code, the only difference is the addition of the test and the converting the exit_rejecting_arguments
to a raise ArgumentError
?
Yes, your understanding is right. However, I think someone that can see the internal Apple modifications might want to pitch in. This is probably what build their internal builds in the past. |
cb924f9
to
38bc491
Compare
Rebased on top of @swift-ci please smoke test |
Question. Beyond the tests, is this just moving code? |
Yes, this is just moving code. The only exception are the calls to This is the diff between the two pieces of text: --- pre.txt 2019-05-29 13:36:46.000000000 -0700
+++ post.txt 2019-05-29 13:36:20.000000000 -0700
@@ -187,22 +187,25 @@
if not args.test_ios_host:
platforms_to_skip_test.add(StdlibDeploymentTarget.iOS)
else:
- exit_rejecting_arguments("error: iOS device tests are not " +
- "supported in open-source Swift.")
+ raise ArgumentError(None,
+ "error: iOS device tests are not " +
+ "supported in open-source Swift.")
if not args.test_ios_simulator:
platforms_to_skip_test.add(StdlibDeploymentTarget.iOSSimulator)
if not args.test_tvos_host:
platforms_to_skip_test.add(StdlibDeploymentTarget.AppleTV)
else:
- exit_rejecting_arguments("error: tvOS device tests are not " +
- "supported in open-source Swift.")
+ raise ArgumentError(None,
+ "error: tvOS device tests are not " +
+ "supported in open-source Swift.")
if not args.test_tvos_simulator:
platforms_to_skip_test.add(StdlibDeploymentTarget.AppleTVSimulator)
if not args.test_watchos_host:
platforms_to_skip_test.add(StdlibDeploymentTarget.AppleWatch)
else:
- exit_rejecting_arguments("error: watchOS device tests are not " +
- "supported in open-source Swift.")
+ raise ArgumentError(None,
+ "error: watchOS device tests are not " +
+ "supported in open-source Swift.")
if not args.test_watchos_simulator:
platforms_to_skip_test.add(
StdlibDeploymentTarget.AppleWatchSimulator) |
LGTM. Just an FYI, I am going to have to make a change here to add support for non-executable tests on iOS. We are going to setup public CI (maybe PR testing as well, not sure) for running non-executable device tests. We are hitting a bunch of IRGen test failures internally only that we could detect without issue publicly with the infrastructure. |
Looks like you need to add a value for the only_executable flag. |
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.
Fix the tests, then let err rip. This looks good to me!
Thank you for splitting out the text so I can eyeball the review! I appreciate it = ).
This will allow using `HostSpecificConfiguration` from other parts that are not the main script in the future. This is interesting because the information is mostly useful when building Swift. The rest of products are not really interested in the results of these calculations. Includes a suite of tests that check the implementation correctly calculates the right targets to build under diverse circumstances.
38bc491
to
def82fe
Compare
Yes. That was it. Good thing the test catch it. Would you like that I hold this until you finish your changes, or you prefer to have this in place? I have no preference. @swift-ci please smoke test |
Lets land this |
The errors seems to imply that #25030 wasn’t compiled in, but swiftlang/swift-package-manager#2134 was? |
@swift-ci Please smoke test OS X platform |
Yes, sounds like a race. It happens pretty rarely, but it does happen. |
This will allow using
HostSpecificConfiguration
from other parts thatare not the main script in the future. This is interesting because the
information is mostly useful when building Swift. The rest of products
are not really interested in the results of these calculations.
Includes a suite of tests that check the implementation correctly
calculates the right targets to build under diverse circumstances.
This is probably the part of #23982 that failed to work and had to be reverted in #23861. If there's any way I can help to integrate this (modifying the code, if necessary), we can work this out.
This was part of #23257. I’m trying to split the PR in smaller ones to make the reviews easier. Other PRs in this group are #23303, #23803, #23810, #23822, #23865, #23915, #23917, #23918, and #23982.