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: Run tests on Linux CI #146

Merged
merged 2 commits into from
Nov 8, 2024
Merged

tests: Run tests on Linux CI #146

merged 2 commits into from
Nov 8, 2024

Conversation

euanh
Copy link
Contributor

@euanh euanh commented Nov 8, 2024

The EndToEnd tests cannot currently be run:

Until now the tests were not compiled on macOS, and the tests were not run on Linux, so CI runs did not deadlock. This PR marks the tests with XCTSkip to prevent them running in CI or when run locally; future PRs will loosen these restrictions.

testQueryEncoding failed on main because Foundation.URL had changed to FoundationEssentials.URL, causing cache hashes to be different. This PR ensures backward compatibility by overriding the type name used when hashing URLs to be Foundation.URL.

Fixes #45

@euanh euanh added the test suite Changes to generator's test suite label Nov 8, 2024
@euanh
Copy link
Contributor Author

euanh commented Nov 8, 2024

@swift-ci test

@euanh
Copy link
Contributor Author

euanh commented Nov 8, 2024

Expect the first run to fail testQueryEncoding on main because Foundation.URL is now called FoundationEssentials.URL.

@euanh
Copy link
Contributor Author

euanh commented Nov 8, 2024

@swift-ci test

…nEssentials.URL

Until Swift 6.0, the fully-qualified name of the URL type was
`Foundation.URL`.  After the adoption of FoundationEssentials, the
name changed to `FoundationEssentials.URL`.  This difference causes
the hashes to change, so for backwards compatibility we pin the
type name to `Foundation.URL`.

Fixes swiftlang#45
@euanh
Copy link
Contributor Author

euanh commented Nov 8, 2024

@swift-ci test

The EndToEnd tests cannot currently be run:

* they deadlock when run under `swift test` (swiftlang#143)
* the CI requires the use of an HTTP proxy to download from the
  Internet, but SDK generator does not support proxies (swiftlang#145)

The tests are not compiled on macOS, but this commit marks
them with `XCTSkip` so they are not run on Linux either.

Future commits will loosen these restrictions.

Fixes swiftlang#45
@euanh
Copy link
Contributor Author

euanh commented Nov 8, 2024

@swift-ci test

@euanh euanh marked this pull request as ready for review November 8, 2024 14:36
@euanh euanh requested a review from MaxDesiatov as a code owner November 8, 2024 14:36
Copy link
Contributor

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

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

Thank you so much for this! 🎉

@euanh euanh merged commit 71e2d79 into swiftlang:main Nov 8, 2024
3 checks passed
@euanh euanh deleted the enable-linux-ci branch November 8, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test suite Changes to generator's test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable tests on Linux CI
2 participants