Skip to content

build-using-self use a self build of swift-test instead #8548

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

Merged
merged 10 commits into from
Apr 23, 2025

Conversation

dschaefer2
Copy link
Member

We are seeing hangs in swift test on Windows. Instead of build-using-self using the underlying toolchain, build swift-test and use that for the tests. When we make improvements to it to fix the underlying problem, we will be able to take advantage of that fix right away.

We are seeing hangs in swift test on Windows. Instead of
build-using-self using the underlying toolchain, build swift-test
and use that for the tests. When we make improvements to it
to fix the underlying problem, we will be able to take advantage
of that fix right away.
Also trying an idea on the test output hang we're seeing.
It's only supported there.
Use swift run to run build products.

Try using a smaller buffer for the AsyncProcess reads to see
if that helps.
We really need to do the pipe draining correctly. That will take
a little more time. So for now, let's just turn off the tests
on Windows until we get that resolved.
@@ -144,31 +145,27 @@ def main() -> None:
shlex.split("swift --version"),
)

# call(
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: It's always nice seeing commented code being removed!

posix=(os.name == "posix"), # must be set correctly, otherwhsie shlex.split("C:\\Foo\\bar") become ['CFoobar']
),
)
if os.name != "nt": # turn off for Windows until we get the hang resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know what may be causing the hangs? It's quite coincidental the hangs started to occurs after the self hosted windows pipeline was changes from using the nightly toolchain, to the nightly 6.1 toolchain.

The self-hosted windows toolchain used the official docker image. should we try to see if the released 6.1 image has the same hangs?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the 6.1 swiftpm has a bug in it. It's still there in 6.2. We should probably fix it.

shlex.split(f"swift run swift-test --configuration {args.config} --parallel {swift_testing_arg} {xctest_arg} --scratch-path .test {ignore}"),
)

integration_test_dir = REPO_ROOT_PATH / "IntegrationTests"
Copy link
Contributor

Choose a reason for hiding this comment

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

to make this code more robust to changes, it would be better to change the change_directory(REPO_ROOT_PATH context manager to return the directory, and use that path here instead of REPO_ROOT_PATH.

That is, change with change_directory(REPO_ROOT_PATH): to with change_directory(REPO_ROOT_PATH) as my_path: and then set integration_test_dir = my_path / "IntegrationTests" or just set it to a relative path (ie: integration_test_dir = Path("./IntegrationTests")

Copy link
Member Author

Choose a reason for hiding this comment

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

We'll be back here to re-enable them on Windows. We can clean things up then. Let's just focus on re-enabling the Windows CI for now.

@dschaefer2 dschaefer2 enabled auto-merge (squash) April 23, 2025 02:58
@dschaefer2 dschaefer2 merged commit b938328 into swiftlang:main Apr 23, 2025
6 checks passed
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