Skip to content

XCTest: update shebang line to name python3 instead of python generically. #441

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

Closed
wants to merge 1 commit into from
Closed

XCTest: update shebang line to name python3 instead of python generically. #441

wants to merge 1 commit into from

Conversation

fischman-bcny
Copy link

Motivated by failure from swiftlang/swift-corelibs-foundation#4740 test runs, which ended with:

+ /Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/swift-corelibs-xctest/build_script.py --swiftc=/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc --build-dir=/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/xctest-macosx-x86_64 --foundation-build-dir=/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/foundation-macosx-x86_64 --swift-build-dir=/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/swift-macosx-x86_64 --release
env: python: No such file or directory

@compnerd
Copy link
Member

compnerd commented May 8, 2023

@swift-ci please test

@compnerd
Copy link
Member

compnerd commented May 8, 2023

CC: @edymtt

@compnerd
Copy link
Member

compnerd commented May 8, 2023

CC: @dduan

@compnerd
Copy link
Member

compnerd commented May 8, 2023

@swift-ci please test macOS platform

@compnerd
Copy link
Member

compnerd commented May 9, 2023

@swift-ci please test

@compnerd
Copy link
Member

compnerd commented May 9, 2023

@swift-ci please test Windows platform

@MaxDesiatov
Copy link
Contributor

@swift-ci test macos

@fischman-bcny fischman-bcny changed the title XCTest: update shebang lines to name python3 instead of python generically. XCTest: update shebang line to name python3 instead of python generically. May 11, 2023
@fischman-bcny
Copy link
Author

@dduan @edymtt macOS CI failure seems unrelated to this PR. Is it possible to merge this to unblock swiftlang/swift-corelibs-foundation#4740 ?

(I've tried & failed to repro the test failures on darwin; on my machine I see different unrelated failures with the xctest test subprocesses exiting -5 whereas CI has them exiting -4...)

@shahmishal
Copy link
Member

@fischman-bcny
Copy link
Author

@shahmishal I had done that in the first version of this PR (2009414) but that also failed CI.
Are you suggesting xctest_checker.py should have python3 but xctest_checker/main.py should not?

(happy to update this PR to be any of these)

@shahmishal
Copy link
Member

I think all of the files should use python3, as we no longer have python2 on the CI nodes.

…cally.

Motivated by [failure](https://ci.swift.org/job/swift-corelibs-foundation-PR-macOS/221/execution/node/43/log/) from swiftlang/swift-corelibs-foundation#4740 test runs, which ended with:
```
+ /Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/swift-corelibs-xctest/build_script.py --swiftc=/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc --build-dir=/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/xctest-macosx-x86_64 --foundation-build-dir=/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/foundation-macosx-x86_64 --swift-build-dir=/Users/ec2-user/jenkins/workspace/swift-corelibs-foundation-PR-macOS/branch-main/build/Ninja-ReleaseAssert/swift-macosx-x86_64 --release
env: python: No such file or directory
```
@fischman-bcny
Copy link
Author

@shahmishal ok, done.

@shahmishal
Copy link
Member

@swift-ci test macOS

@fischman-bcny
Copy link
Author

@shahmishal We're back to the CI failing on unrelated issues. Since we know that the CI machines don't have a python binary and do have a python3 binary, and since this is holding up submissions to the foundation repo, can we merge this PR now?

@fischman-bcny
Copy link
Author

Same command that failed on CI succeeded on my machine: https://gist.githubusercontent.com/fischman-bcny/008a14e4a2afe42a2767dd97ec3cc636/raw/05c5125ba49133bc64e5bc4b0a029954f8f65e81/gistfile0.txt

@shahmishal is there a way I can ssh into the CI machine to investigate its failures? Or any other suggestions for unblocking this PR?

@fischman-bcny
Copy link
Author

Closing this PR since swiftlang/swift#65958 merged.

meg-gupta pushed a commit to meg-gupta/swift that referenced this pull request May 22, 2023
A workaround for the fact that fixing this in XCTest's repository
(swiftlang/swift-corelibs-xctest#441) is blocked on XCTest's
CI being broken for unrelated reasons (and ones which I cannot reproduce).
NuriAmari pushed a commit to NuriAmari/swift that referenced this pull request May 28, 2023
A workaround for the fact that fixing this in XCTest's repository
(swiftlang/swift-corelibs-xctest#441) is blocked on XCTest's
CI being broken for unrelated reasons (and ones which I cannot reproduce).
al45tair pushed a commit to al45tair/swift that referenced this pull request Jun 7, 2023
A workaround for the fact that fixing this in XCTest's repository
(swiftlang/swift-corelibs-xctest#441) is blocked on XCTest's
CI being broken for unrelated reasons (and ones which I cannot reproduce).
MaxDesiatov pushed a commit to swiftlang/swift that referenced this pull request Jun 14, 2023
A workaround for the fact that fixing this in XCTest's repository
(swiftlang/swift-corelibs-xctest#441) is blocked on XCTest's
CI being broken for unrelated reasons (and ones which I cannot reproduce).
MaxDesiatov added a commit to swiftlang/swift that referenced this pull request Jun 15, 2023
[5.8] Call python3 to execute XCTest's build_script.py

A workaround for the fact that fixing this in XCTest's repository (swiftlang/swift-corelibs-xctest#441) is blocked on XCTest's CI being broken for unrelated reasons (and ones which I cannot reproduce).

Risk: low, all other Python scripts in the `swift` and `swift-package-manager` repositories already include this change and use `python3` in both `main` and `release/5.9` branches. This specific change has been on the `main` and `release/5.9` branches for a while now.
Original PRs: #65958 for `main` and #66415 for `release/5.9`
Reviewed by: @compnerd, @al45tair, and @shahmishal 
Resolves: unblocks PRs on the `swift-corelibs-foundation` repository that build XCTest as a part of their CI jobs.
Tests: N/A
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.

6 participants