@@ -25,8 +25,8 @@ private import _TestingInternals
25
25
/// to this function.
26
26
///
27
27
/// External callers cannot call this function directly. The can use
28
- /// ``copyABIEntryPoint_v0() `` to get a reference to an ABI-stable version of
29
- /// this function.
28
+ /// ``ABIv0/entryPoint-swift.type.property `` to get a reference to an ABI-stable
29
+ /// version of this function.
30
30
func entryPoint( passing args: __CommandLineArguments_v0 ? , eventHandler: Event . Handler ? ) async -> CInt {
31
31
let exitCode = Locked ( rawValue: EXIT_SUCCESS)
32
32
@@ -200,7 +200,7 @@ public struct __CommandLineArguments_v0: Sendable {
200
200
/// The value of the `--xunit-output` argument.
201
201
public var xunitOutput : String ?
202
202
203
- /// The value of the `--experimental- event-stream-output` argument.
203
+ /// The value of the `--event-stream-output` argument.
204
204
///
205
205
/// Data is written to this file in the [JSON Lines](https://jsonlines.org)
206
206
/// text format. For each event handled by the resulting event handler, a JSON
@@ -215,18 +215,18 @@ public struct __CommandLineArguments_v0: Sendable {
215
215
///
216
216
/// The file is closed when this process terminates or the test run completes,
217
217
/// whichever occurs first.
218
- public var experimentalEventStreamOutput : String ?
218
+ public var eventStreamOutput : String ?
219
219
220
220
/// The version of the event stream schema to use when writing events to
221
- /// ``experimentalEventStreamOutput ``.
221
+ /// ``eventStreamOutput ``.
222
222
///
223
223
/// If the value of this property is `nil`, events are encoded verbatim (using
224
224
/// ``Event/Snapshot``.) Otherwise, the corresponding stable schema is used
225
225
/// (e.g. ``ABIv0/Record`` for `0`.)
226
226
///
227
227
/// - Warning: The behavior of this property will change when the ABI version
228
228
/// 0 JSON schema is finalized.
229
- public var experimentalEventStreamVersion : Int ?
229
+ public var eventStreamVersion : Int ?
230
230
231
231
/// The value(s) of the `--filter` argument.
232
232
public var filter : [ String ] ?
@@ -252,8 +252,8 @@ extension __CommandLineArguments_v0: Codable {
252
252
case quiet
253
253
case _verbosity = " verbosity "
254
254
case xunitOutput
255
- case experimentalEventStreamOutput
256
- case experimentalEventStreamVersion
255
+ case eventStreamOutput
256
+ case eventStreamVersion
257
257
case filter
258
258
case skip
259
259
case repetitions
@@ -288,7 +288,8 @@ func parseCommandLineArguments(from args: [String]) throws -> __CommandLineArgum
288
288
// NOTE: While the output event stream is opened later, it is necessary to
289
289
// open the configuration file early (here) in order to correctly construct
290
290
// the resulting __CommandLineArguments_v0 instance.
291
- if let configurationIndex = args. firstIndex ( of: " --experimental-configuration-path " ) , !isLastArgument( at: configurationIndex) {
291
+ if let configurationIndex = args. firstIndex ( of: " --configuration-path " ) ?? args. firstIndex ( of: " --experimental-configuration-path " ) ,
292
+ !isLastArgument( at: configurationIndex) {
292
293
let path = args [ args. index ( after: configurationIndex) ]
293
294
let file = try FileHandle ( forReadingAtPath: path)
294
295
let configurationJSON = try file. readToEnd ( )
@@ -302,12 +303,14 @@ func parseCommandLineArguments(from args: [String]) throws -> __CommandLineArgum
302
303
}
303
304
304
305
// Event stream output (experimental)
305
- if let eventOutputIndex = args. firstIndex ( of: " --experimental-event-stream-output " ) , !isLastArgument( at: eventOutputIndex) {
306
- result. experimentalEventStreamOutput = args [ args. index ( after: eventOutputIndex) ]
306
+ if let eventOutputIndex = args. firstIndex ( of: " --event-stream-output " ) ?? args. firstIndex ( of: " --experimental-event-stream-output " ) ,
307
+ !isLastArgument( at: eventOutputIndex) {
308
+ result. eventStreamOutput = args [ args. index ( after: eventOutputIndex) ]
307
309
}
308
310
// Event stream output (experimental)
309
- if let eventOutputVersionIndex = args. firstIndex ( of: " --experimental-event-stream-version " ) , !isLastArgument( at: eventOutputVersionIndex) {
310
- result. experimentalEventStreamVersion = Int ( args [ args. index ( after: eventOutputVersionIndex) ] )
311
+ if let eventOutputVersionIndex = args. firstIndex ( of: " --event-stream-version " ) ?? args. firstIndex ( of: " --experimental-event-stream-version " ) ,
312
+ !isLastArgument( at: eventOutputVersionIndex) {
313
+ result. eventStreamVersion = Int ( args [ args. index ( after: eventOutputVersionIndex) ] )
311
314
}
312
315
#endif
313
316
@@ -404,9 +407,9 @@ public func configurationForEntryPoint(from args: __CommandLineArguments_v0) thr
404
407
405
408
#if canImport(Foundation)
406
409
// Event stream output (experimental)
407
- if let eventStreamOutputPath = args. experimentalEventStreamOutput {
410
+ if let eventStreamOutputPath = args. eventStreamOutput {
408
411
let file = try FileHandle ( forWritingAtPath: eventStreamOutputPath)
409
- let eventHandler = try eventHandlerForStreamingEvents ( version: args. experimentalEventStreamVersion ) { json in
412
+ let eventHandler = try eventHandlerForStreamingEvents ( version: args. eventStreamVersion ) { json in
410
413
try ? _writeJSONLine ( json, to: file)
411
414
}
412
415
configuration. eventHandler = { [ oldEventHandler = configuration. eventHandler] event, context in
@@ -487,7 +490,7 @@ func eventHandlerForStreamingEvents(version: Int?, forwardingTo eventHandler: @e
487
490
case 0 :
488
491
ABIv0 . Record. eventHandler ( forwardingTo: eventHandler)
489
492
case let . some( unsupportedVersion) :
490
- throw _EntryPointError. invalidArgument ( " --experimental- event-stream-version " , value: " \( unsupportedVersion) " )
493
+ throw _EntryPointError. invalidArgument ( " --event-stream-version " , value: " \( unsupportedVersion) " )
491
494
}
492
495
}
493
496
0 commit comments