Skip to content
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

Tests: repair the test suite on Windows #1774

Merged
merged 6 commits into from
Jan 17, 2025
Merged

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jan 7, 2025

With this set of changes, we now can run the test suite on Windows to completion, restoring the state to where it was originally.

@compnerd
Copy link
Member Author

compnerd commented Jan 7, 2025

@swift-ci please test

@@ -3054,10 +3060,10 @@ final class SwiftDriverTests: XCTestCase {
XCTAssertEqual(emitModuleJob.outputs[0].file, try toPath("Test.swiftmodule"))
XCTAssertEqual(emitModuleJob.outputs[1].file, try toPath("Test.swiftdoc"))
XCTAssertEqual(emitModuleJob.outputs[2].file, try toPath("Test.swiftsourceinfo"))
XCTAssertEqual(emitModuleJob.outputs[3].file, try VirtualPath(path: "./Test.swiftinterface"))
XCTAssertEqual(emitModuleJob.outputs[3].file, try VirtualPath.relative(.init("Test.swiftinterface")))
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to failed the test. I forgot why those two outputs behaves differently from other output kinds, maybe they should behave the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think that they should behave the same. Also interesting is that it passed on Windows and Linux, but failed only on macOS?

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

With this set of changes, we are now down to 1 failure on the
SwiftDriverTests on Windows. While we are not near the original state of
tests on Windows (the full test suite used to pass), this is a step in
the right direction.
Remove the printing of the generated command line. If there are cases
where we need to diagnose failures in CI, we should prefer to build
helpers that will show the actual and expected values to enable us to
triage issues more readily.
Use the `assertDriverDiagnostics` helper to ensure that all the emitted
diagnostics are verified. Remove the debug printing and output to the
logs. This is no longer necessary as we will verify that any additional
diagnostics emitted are checked and the helper will render the missed or
non-matching diagnostics allowing easy triaging of the failures in CI.
This repairs the ExplicitModuleBuildTests test suite on Windows. The
input adjustment is required to match the paths after processing.
These changes repair the test failure son Windows, which is required to
bring the swift driver test suite back to fully passing on Windows as it
was previously.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@artemcm this actually happens to correct a behavioral issue that was overlooked due to a test mistake.

@compnerd
Copy link
Member Author

@swift-ci please test Windows platform

@compnerd compnerd changed the title Tests: mostly repair the SwiftDriverTests on Windows Tests: repair the test suite on Windows Jan 17, 2025
@compnerd compnerd merged commit bd50b23 into swiftlang:main Jan 17, 2025
3 checks passed
@compnerd compnerd deleted the win-1 branch January 17, 2025 20:09
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.

3 participants