-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix APIDiff test suite #3593
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
Fix APIDiff test suite #3593
Conversation
…wiftlang#3591)" This reverts commit c5947d6.
swiftlang/swift#38245 |
@swift-ci smoke test |
@@ -259,7 +259,7 @@ let package = Package( | |||
dependencies: ["Build", "SPMTestSupport"]), | |||
.testTarget( | |||
name: "CommandsTests", | |||
dependencies: ["swift-build", "swift-package", "swift-test", "swift-run", "Commands", "Workspace", "SPMTestSupport"]), | |||
dependencies: ["swift-build", "swift-package", "swift-test", "swift-run", "Commands", "Workspace", "SPMTestSupport", "Build"]), |
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.
@neonichu @abertelrud wdyt?
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.
This looks like the same dependency we ran into trouble with before, where running the unit tests for even libSwiftPMDataModel will now need Build and everything it brings with it (llbuild, etc). That will make it not possible to be able to build any of the tests on iOS, for example.
But I think it's the exact same issue as the need to test for the -entry-point-function-name
flag, so we should be able to use the same solution here.
We should make also add something to the Package to check that there is no transitive dependency of the tests on Build, to give an earlier warning.
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.
CommandsTests already has a transitive dependency on Build via Commands, so I'm not sure this changes much - are these tests being run on iOS today?
The check the entry point name tests use:
#if swift(<5.5)
try XCTSkipIf(true, "skipping because host compiler doesn't support '-entry-point-function-name'")
#endif
won't work for this because the version of Swift which has the new flag doesn't have a version number yet
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.
Oh, I think this might be fine then, what was problematic was adding the Build
dependency in SPMTestSupport
so it would be needed for any test suite.
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.
Oh sorry, I missed that this was CommandsTests
and not SPMTestSupport
. This is fine, since only the libSwiftPMDataModel tests are run on iOS. Shelling out on iOS is prohibited anyway, so none of the command-related tests can work.
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.
Since this is only adding the Build
dependency to CommandsTests
(and not the more general SPMTestSupport
, which I'd originally thought), this looks fine to me. Thanks!
I verified a toolchain build succeeded @ swiftlang/swift#38285 - I'm going to rerun tests here one more time since it's been a few days |
@swift-ci please smoke test |
Reenable the APIDiff tests
Motivation:
Reenable the APIDiff tests
Modifications:
Result:
APIDiff tests should pass or be skipped instead of failing with toolchains from 2021-05-14 - 2021-06-28