-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
More swiftbuild testing #8333
base: main
Are you sure you want to change the base?
More swiftbuild testing #8333
Conversation
@swift-ci test Windows |
@swift-ci please test |
@swift-ci test macOS |
@swift-ci test Windows |
try localFileSystem.createDirectory(packagePath) | ||
try sh(swiftPackage, "--package-path", packagePath, "init", "--type", "executable") | ||
try sh(swiftBuild, "--package-path", packagePath, "--build-system", "swiftbuild") | ||
do { |
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.
Are these do
blocks intended to swallow all errors? Seems like this test should be skipped instead.
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.
These do
blocks seem to throw errors, and that's why I had to comment out the assert at the bottom. The original intent is unclear. You can see them in #8276 too.
The goal is to increase test coverage, even if the assert/test at the end don't currently work. I think that these do exercise the build function.
final class APIDiffTests: CommandsTestCase { | ||
class APIDiffTestCase: CommandsBuildProviderTestCase { | ||
override func setUpWithError() throws { | ||
try XCTSkipIf(type(of: self) == APIDiffTestCase.self, "Pay no attention to the class behind the curtain.") |
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.
Is this to make sure this class is "abstract" and ensure its always extended? I don't want to be a wet paper bag, but a more clear message would help clarify the intent.
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.
That's correct. I've updated this message to help clarify that.
@@ -173,7 +173,7 @@ extension BuildSystemProvider.Kind { | |||
public var usesXcodeBuildEngine: Bool { | |||
switch self { | |||
case .native: return false | |||
case .swiftbuild: return false | |||
case .swiftbuild: return true |
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.
Don't change this. I am removing this calculated boolean in my swift run/test PR.
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.
Ok, is that change going in imminently? If not, this change really improves the test success rates until that other PR lands.
@@ -191,3 +191,16 @@ public enum BuildSystemUtilities { | |||
return try AbsolutePath(validating: env, relativeTo: workingDir) | |||
} | |||
} | |||
|
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.
Same with this. I am revamping how this path is calculated.
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.
Same comment as above. Which PR will be merged first?
Augment Commands Tests to run against the Native and Swift Build build systems. - BuildCommandTests - TestCommandTests - RunCommandTests - APIDiffTests - PackageCommandTests Also, - Add a new BuildCommandTest and RunCommandTest test case that ensures a package with target conditionals builds and runs successfully - update BuildSystemProvider.Kind to define a "useXcodeBuildSystemPath" variable instead of sprinkling the `buildSystem == .xcode` all over the place - Augment the Swift Build integration test to run `swift test` TODO: - Instead of marking test failures as "Skipped", See if we can mark them as "expected fail" so we are forced to update the test once the production code has been update to support the "feature". more update'
This reverts commit 3e06c8f497b33b24aefc18290d9226dea01525e6.
Remove the duplicate symbol checks for use in a future enhancement Refactor xcode specific tests into the new build system matrix
Skip Xcode build system variant of tests that are failing
Fix double-override in BuildCommandTests
…d integration issues
02771e2
to
153eb90
Compare
@swift-ci test Windows |
@swift-ci please test |
Add more verifications of the swiftbuild build system to ensure correctness moving forward. Tag various discovered swift-build integration issues with the tag
SWBINTTODO
with a general description of the problem encountered to enable categorization for further exploration activities.Motivation:
The swiftbuild integration has only the most basic smoke testing of its functionality. Add more automated tests, and explicit skips where there are functionality gaps that need to be addressed.