Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Updates tests for execution on non Apple hosts. #8407

Merged

Conversation

kcieplak
Copy link
Contributor

  • Update StringChecker to handle Windows line endings.
  • Use .exe suffix for executables on Windows
  • Use where.exe on Windows for tool location detection.
  • Enable unconditionally skipped tests, marking with known issue where appropriate.
  • Fix unconditionally skipped tests, skipping was added many years ago and never removed.
  • Add matrix style testing for the build system (native/swiftbuild) on "swift init/build/test" tests.

@kcieplak
Copy link
Contributor Author

@swift-ci test

@kcieplak kcieplak force-pushed the topics/fix-up-swift-integration-tests branch from 0cb9f61 to 63ca4fb Compare March 25, 2025 15:44
@kcieplak
Copy link
Contributor Author

@swift-ci test linux

@@ -22,13 +23,15 @@ private struct BasicTests {
@Test(
.skipSwiftCISelfHosted(
"These packages don't use the latest runtime library, which doesn't work with self-hosted builds."
)
),
.skipHostOS(.windows, "random.swift:34:8: error: unsupported platform")
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's get a GitHub issue filed for that error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kcieplak
Copy link
Contributor Author

kcieplak commented Mar 25, 2025

CI is failing on linux self hosted tests.
swift run executes a binary but that binary cannot find libswiftCore.so at runtime.

libswiftCore.so: cannot open shared object file: No such file or directory

I can add a known issue but I think that other CI pipelines where a SDK is installed at /usr/ might not cause the error and will fail. Trying to find a solution.

@kcieplak kcieplak force-pushed the topics/fix-up-swift-integration-tests branch from 63ca4fb to fe58ae5 Compare March 26, 2025 18:04
@kcieplak
Copy link
Contributor Author

@swift-ci test

@kcieplak
Copy link
Contributor Author

CI is failing on linux self hosted tests. swift run executes a binary but that binary cannot find libswiftCore.so at runtime.

libswiftCore.so: cannot open shared object file: No such file or directory

I can add a known issue but I think that other CI pipelines where a SDK is installed at /usr/ might not cause the error and will fail. Trying to find a solution.

#8416

@kcieplak
Copy link
Contributor Author

@swift-ci test windows

@kcieplak
Copy link
Contributor Author

@swift-ci test macOS

@kcieplak kcieplak force-pushed the topics/fix-up-swift-integration-tests branch from fe58ae5 to b4065c1 Compare March 27, 2025 18:16
@kcieplak
Copy link
Contributor Author

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Mar 28, 2025

@swift-ci please test windows

// #expect(stdout.contains("Hello, world!"))
try sh(swiftBuild, "--package-path", packagePath, "--build-system", buildSystemProvider.rawValue)

try withKnownIssue("Issue #8416 - error while loading shared libraries: libswiftCore.so: cannot open shared object file: No such file or directory") {
Copy link
Member

Choose a reason for hiding this comment

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

praise: Thanks for linking to a GitHub issue for this with the details of the problem. I've tagged it with the "swift build" label for integration tracking purposes.

@@ -23,13 +24,15 @@ private struct BasicTests {
.skipSwiftCISelfHosted(
"These packages don't use the latest runtime library, which doesn't work with self-hosted builds."
),
.requireUnrestrictedNetworkAccess("Test requires access to https://github.com")
.requireUnrestrictedNetworkAccess("Test requires access to https://github.com"),
.skipHostOS(.windows, "Issue #8409 - random.swift:34:8: error: unsupported platform")
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (if-minor, if-updating): Can we use the .bug trait and include the URL to the GitHub issue?

FYI: There is no need to update the PR just to address this, but something to keep in mind for subsequent changes.

Copy link
Member

@cmcgee1024 cmcgee1024 left a comment

Choose a reason for hiding this comment

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

This looks really good. There's just one blocking issue that I think should be easy to resolve.

@bkhouri
Copy link
Contributor

bkhouri commented Mar 28, 2025

@swift-ci please test

@bkhouri
Copy link
Contributor

bkhouri commented Mar 28, 2025

@swift-ci please test windows

- Update StringChecker to handle Windows line endings.
- Use .exe suffix for executables on Windows
- Use where.exe on Windows for tool location detection.
- Enable unconditionally skipped tests, marking with known
  issue where appropriate.
- Fix unconditionally skipped tests, skipping was added many
  years ago and never removed.
- Add matrix style testing for the build system (native/swiftbuild) on
  "swift init/build/test" tests.

Verified

This commit was signed with the committer’s verified signature.
* Add .bug() traits to tests allowing for tracking
swift-build integration issues using the "SWBINTTODO"
comment string.
* bugs with id 0, and SWBINTTODO indicate there
  needs to be a GH raised.
* bugs with a URL indicate there is a tracking issue.
@kcieplak kcieplak force-pushed the topics/fix-up-swift-integration-tests branch from df81e19 to 9b842b0 Compare March 31, 2025 12:18
@kcieplak
Copy link
Contributor Author

@swift-ci test

@kcieplak
Copy link
Contributor Author

@swift-ci test windows

@bkhouri
Copy link
Contributor

bkhouri commented Apr 1, 2025

@swift-ci please test windows

@bkhouri
Copy link
Contributor

bkhouri commented Apr 1, 2025

@swift-ci please test self hosted windows

@cmcgee1024 cmcgee1024 merged commit 6bf9ba6 into swiftlang:main Apr 1, 2025
6 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants