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

Revert "Ensure Xcode SDK paths are set when running test targets." #7054

Merged
merged 1 commit into from Nov 7, 2023

Conversation

neonichu
Copy link
Member

@neonichu neonichu commented Nov 6, 2023

Reverts #7040

This is very speculative revert at this point since I am unable to reproduce, but since last Wednesday, we have been seeing this issue on the nightly toolchain CI:

error: error while executing `/Applications/Xcode.app/Contents/Developer/usr/bin/xctest -XCTest WorkspaceTests.PinsStoreTests/testLoadingSchema2 /Users/ec2-user/jenkins/workspace/oss-swift-package-macos/build/buildbot_osx/swiftpm-macosx-x86_64/apple/Products/Release/WorkspaceTests.xctest`: close error: Bad file descriptor (9)

and this change seems to fit in timeline wise and also as it affects testing, so it becomes the most relevant candidate for a speculative revert. The process invocation code hasn't changed in a meaningful way in a long time, so it seems unlikely that the logic there is the culprit.

rdar://117927523

@neonichu
Copy link
Member Author

neonichu commented Nov 6, 2023

@swift-ci please test

@shahmishal shahmishal merged commit 1de30cc into main Nov 7, 2023
5 checks passed
@shahmishal shahmishal deleted the revert-7040-jgrynspan/missing-dyld-args branch November 7, 2023 15:40
grynspan added a commit that referenced this pull request Nov 14, 2023
Currently, some of our code paths that run test targets don't correctly
set the `DYLD_FRAMEWORK_PATH` and `DYLD_LIBRARY_PATH` arguments on
macOS. This hasn't been a problem in practice because the XCTest helper
tool is able to sort it out for us, but my plan with swift-testing is to
run an executable directly (like we do for corelibs-xctest.) That means
we'll have a code path that could potentially rely on XCTest or other
Apple SDK bits, but which is not calling through the XCTest helper tool.

This change hoists our setting of those arguments to a position where
they are always set (on macOS only!) before we run a test target,
regardless of build style.

This change was previously landed as #7040 but was reverted (#7054)
while we investigated a toolchain regression. We do not believe #7040 is
the root cause of that issue, so this PR reapplies it.
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.

None yet

4 participants