Skip to content

Pass SWIFT_EXEC to swift-test via bootstrap #4213

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 1 commit into from
Nov 2, 2022

Conversation

neonichu
Copy link
Contributor

It looks like so far we have only been passing SWIFT_EXEC to swift-build but not swift-test.

@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

@neonichu neonichu self-assigned this Mar 15, 2022
Copy link
Contributor

@tomerd tomerd left a comment

Choose a reason for hiding this comment

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

good catch. was this causing the issue @elsh ran into?

@neonichu
Copy link
Contributor Author

good catch. was this causing the issue @elsh ran into?

It wasn't, but I noticed it while looking at how the just built swiftc gets passed along.

@neonichu
Copy link
Contributor Author

@swift-ci please smoke test macOS

1 similar comment
@neonichu
Copy link
Contributor Author

@swift-ci please smoke test macOS

@neonichu
Copy link
Contributor Author

Looks like we're consistently hitting

Test Case '-[WorkspaceTests.WorkspaceTests testSimpleAPI]' started./Users/ec2-user/jenkins/workspace/swift-package-manager-PR-macos-smoke-test/branch-main/swiftpm/Tests/WorkspaceTests/WorkspaceTests.swift:4171: error: -[WorkspaceTests.WorkspaceTests testSimpleAPI] : failed: caught error: "fatalError"Test Case '-[WorkspaceTests.WorkspaceTests testSimpleAPI]' failed (3.897 seconds)

@neonichu
Copy link
Contributor Author

This means that there were diagnostics, but the test does not print them 🥲

@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

2 similar comments
@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

@tomerd
Copy link
Contributor

tomerd commented Mar 17, 2022

@swift-ci please smoke test

@neonichu
Copy link
Contributor Author

Printing the diagnostics doesn't seem to have given us more info, not sure if something consumes stdout here or the fatalError is coming from somewhere else. In any case, converting this to draft since it won't be mergeable in the short term.

@neonichu neonichu marked this pull request as draft March 17, 2022 22:53
@tomerd
Copy link
Contributor

tomerd commented Mar 18, 2022

@neonichu from the log it seems like the test is failing with "fatalError" :/

@neonichu
Copy link
Contributor Author

@neonichu from the log it seems like the test is failing with "fatalError" :/

Right, I was thinking that would be this fatal error, but it doesn't seem to be, as there are no errors printed after my change to print them. So right now not sure how to figure out where the fatal error is coming from.

@abertelrud
Copy link
Contributor

I've been seeing that very test fail locally, but only when run as part of WorkspaceTests.WorkspaceTests and not when only that test is being run. The warning is due to a mismatch between the minimum deployment target for PackageDescription, which gets memoized as 10.15.4 on macOS when run as part of the suite but which should be 11.0. This has to do with how the debug binary is found. This should be macOS-specific, BTW — and the linux failure looks different.

@abertelrud
Copy link
Contributor

I guess it looks slightly different, since it's WorkspaceTests.swift:4171 that's failing here but WorkspaceTests.swift:4170 in my case — but it's interesting that it's the exact same test that's failing.

@neonichu
Copy link
Contributor Author

neonichu commented Nov 1, 2022

@swift-ci please smoke test

@neonichu
Copy link
Contributor Author

neonichu commented Nov 1, 2022

Looks like whatever made this fail was unrelated.

It looks like so far we have only been passing `SWIFT_EXEC` to `swift-build` but not `swift-test`.
@neonichu neonichu force-pushed the swift-exec-for-swift-test branch from ed11d42 to 57cdb59 Compare November 1, 2022 22:50
@neonichu neonichu marked this pull request as ready for review November 1, 2022 22:50
@neonichu
Copy link
Contributor Author

neonichu commented Nov 1, 2022

@swift-ci please smoke test

@neonichu
Copy link
Contributor Author

neonichu commented Nov 2, 2022

@swift-ci please smoke test macOS

@tomerd
Copy link
Contributor

tomerd commented Nov 2, 2022

@compnerd may be interesting to you?

@neonichu
Copy link
Contributor Author

neonichu commented Nov 2, 2022

@swift-ci please smoke test macOS

@neonichu neonichu merged commit 59dc518 into main Nov 2, 2022
@neonichu neonichu deleted the swift-exec-for-swift-test branch November 2, 2022 16:38
neonichu added a commit that referenced this pull request Nov 4, 2022
neonichu added a commit that referenced this pull request Nov 6, 2022
neonichu added a commit that referenced this pull request Nov 15, 2022
neonichu added a commit that referenced this pull request Nov 16, 2022
neonichu added a commit that referenced this pull request Nov 30, 2022
neonichu added a commit that referenced this pull request Dec 1, 2022
neonichu added a commit that referenced this pull request Dec 7, 2022
neonichu added a commit that referenced this pull request Dec 8, 2022
This reverts commit 59dc518.

This change was incorrect, `bootstrap` is in fact creating a symlink to the inferior compiler for testing, so overriding `SWIFT_EXEC` is incorrect.
neonichu added a commit that referenced this pull request Dec 8, 2022
* Revert "Pass `SWIFT_EXEC` to swift-test via bootstrap (#4213)"
* Revert "Disable `FunctionalTests` temporarily (#5875)"
* Reenable disabled tests

These tests were disabled but proven working again.

rdar://101868275
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