Skip to content

Always set the XCTest bundle path on Darwin when running exit tests. #422

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

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented May 17, 2024

Xcode is a complicated beast and there are code paths that lead to us running a test hosted by XCTest that isn't discoverable by the existing exit test implementation. This PR makes that implementation more robust in these scenarios and fixes spurious exit test failures that were resulting.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

Xcode is a complicated beast and there are code paths that lead to us running a
test hosted by XCTest that isn't discoverable by the existing exit test
implementation. This PR makes that implementation more robust in these scenarios
and fixes spurious exit test failures that were resulting.
@grynspan grynspan added bug 🪲 Something isn't working tools integration 🛠️ Integration of swift-testing into tools/IDEs darwin 🍎 macOS, iOS, watchOS, tvOS, and visionOS support labels May 17, 2024
@grynspan grynspan self-assigned this May 17, 2024
@grynspan
Copy link
Contributor Author

@swift-ci please test

@@ -95,6 +95,10 @@
#include <wasi/libc-environ.h>
#endif

#if __has_include(<libgen.h>)
#include <libgen.h>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For basename_r().

@grynspan
Copy link
Contributor Author

Windows failure is a known issue in the compiler.

@grynspan grynspan merged commit c6a92a1 into main May 18, 2024
@grynspan grynspan deleted the jgrynspan/exit-tests-always-set-xctest-bundle-when-hosted branch May 18, 2024 00:21
@grynspan grynspan added the exit-tests ☠️ Work related to exit tests label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working darwin 🍎 macOS, iOS, watchOS, tvOS, and visionOS support exit-tests ☠️ Work related to exit tests tools integration 🛠️ Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants