Commit 0a568ed
committed
Make
Right now, `XCTMain()` returns `Never` and calls `exit()` to report its status. This makes it difficult (if not outright impossible) to do any post-test cleanup work like writing an event log or other cleanup.
This PR adds a new overload of `XCTMain()` that instead returns the intended exit code of the process (as `CInt`, since process exit codes passed to `exit()` are always of type `int` in C.) The new overload is, for now, disfavoured until we can teach SwiftPM about it. Once we can (in a subsequent PR), we'll mark the _old_ one disfavored and deprecated.XCTMain() return its exit code instead of calling exit().1 parent 191097e commit 0a568ed
1 file changed
+18
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 62 | + | |
70 | 63 | | |
71 | 64 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
75 | 69 | | |
76 | 70 | | |
77 | 71 | | |
| |||
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
102 | | - | |
| 96 | + | |
103 | 97 | | |
104 | 98 | | |
105 | | - | |
| 99 | + | |
106 | 100 | | |
107 | 101 | | |
108 | 102 | | |
| |||
133 | 127 | | |
134 | 128 | | |
135 | 129 | | |
136 | | - | |
| 130 | + | |
137 | 131 | | |
138 | 132 | | |
139 | 133 | | |
| |||
145 | 139 | | |
146 | 140 | | |
147 | 141 | | |
148 | | - | |
| 142 | + | |
149 | 143 | | |
150 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
0 commit comments