Commit 3e955b7
authored
Only clear exit test ID env var upon successful lookup (#1226)
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:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.1 parent cfa0c09 commit 3e955b7
1 file changed
+22
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
713 | 717 | | |
714 | 718 | | |
715 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
716 | 731 | | |
717 | 732 | | |
718 | 733 | | |
| |||
723 | 738 | | |
724 | 739 | | |
725 | 740 | | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
| 741 | + | |
738 | 742 | | |
739 | 743 | | |
740 | 744 | | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
741 | 750 | | |
742 | 751 | | |
743 | 752 | | |
| |||
867 | 876 | | |
868 | 877 | | |
869 | 878 | | |
870 | | - | |
| 879 | + | |
871 | 880 | | |
872 | 881 | | |
873 | 882 | | |
| |||
0 commit comments