Skip to content

Conversation

@stmontgomery
Copy link
Contributor

This changes the logic in ExitTest.findInEnvironmentForEntryPoint() to only clear the environment variable containing the ID of the exit test to run if an exit test is successfully located.

Motivation:

This ensures that if a tool integrates with the testing library and has both its own built-in copy of the library but also may call into the ABI entry point, both usage scenarios can successfully look up the exit test. Without this fix, if an earlier attempt to look up an exit test fails, the environment variable would be cleared which prevents a subsequent lookup attempt from succeeding.

Checklist:

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

@stmontgomery stmontgomery added this to the Swift 6.x (main) milestone Jul 16, 2025
@stmontgomery stmontgomery self-assigned this Jul 16, 2025
@stmontgomery stmontgomery added enhancement New feature or request tools integration 🛠️ Integration of swift-testing into tools/IDEs exit-tests ☠️ Work related to exit tests labels Jul 16, 2025
@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery stmontgomery merged commit 3e955b7 into swiftlang:main Jul 16, 2025
3 checks passed
@stmontgomery stmontgomery deleted the clear-exit-test-env-var branch July 16, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request 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.

3 participants