@@ -25,8 +25,8 @@ private import _TestingInternals
2525/// to this function.
2626///
2727/// 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.
3030func entryPoint( passing args: __CommandLineArguments_v0 ? , eventHandler: Event . Handler ? ) async -> CInt {
3131 let exitCode = Locked ( rawValue: EXIT_SUCCESS)
3232
@@ -200,7 +200,7 @@ public struct __CommandLineArguments_v0: Sendable {
200200 /// The value of the `--xunit-output` argument.
201201 public var xunitOutput : String ?
202202
203- /// The value of the `--experimental- event-stream-output` argument.
203+ /// The value of the `--event-stream-output-path ` argument.
204204 ///
205205 /// Data is written to this file in the [JSON Lines](https://jsonlines.org)
206206 /// text format. For each event handled by the resulting event handler, a JSON
@@ -215,18 +215,18 @@ public struct __CommandLineArguments_v0: Sendable {
215215 ///
216216 /// The file is closed when this process terminates or the test run completes,
217217 /// whichever occurs first.
218- public var experimentalEventStreamOutput : String ?
218+ public var eventStreamOutputPath : String ?
219219
220220 /// The version of the event stream schema to use when writing events to
221- /// ``experimentalEventStreamOutput ``.
221+ /// ``eventStreamOutput ``.
222222 ///
223223 /// The corresponding stable schema is used to encode events to the event
224224 /// stream (for example, ``ABIv0/Record`` is used if the value of this
225225 /// property is `0`.)
226226 ///
227227 /// If the value of this property is `nil`, the testing library assumes that
228228 /// the newest available schema should be used.
229- public var experimentalEventStreamVersion : Int ?
229+ public var eventStreamVersion : Int ?
230230
231231 /// The value(s) of the `--filter` argument.
232232 public var filter : [ String ] ?
@@ -252,8 +252,8 @@ extension __CommandLineArguments_v0: Codable {
252252 case quiet
253253 case _verbosity = " verbosity "
254254 case xunitOutput
255- case experimentalEventStreamOutput
256- case experimentalEventStreamVersion
255+ case eventStreamOutputPath
256+ case eventStreamVersion
257257 case filter
258258 case skip
259259 case repetitions
@@ -288,7 +288,8 @@ func parseCommandLineArguments(from args: [String]) throws -> __CommandLineArgum
288288 // NOTE: While the output event stream is opened later, it is necessary to
289289 // open the configuration file early (here) in order to correctly construct
290290 // 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) {
292293 let path = args [ args. index ( after: configurationIndex) ]
293294 let file = try FileHandle ( forReadingAtPath: path)
294295 let configurationJSON = try file. readToEnd ( )
@@ -302,12 +303,14 @@ func parseCommandLineArguments(from args: [String]) throws -> __CommandLineArgum
302303 }
303304
304305 // 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-path " ) ?? args. firstIndex ( of: " --experimental-event-stream-output " ) ,
307+ !isLastArgument( at: eventOutputIndex) {
308+ result. eventStreamOutputPath = args [ args. index ( after: eventOutputIndex) ]
307309 }
308310 // 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) ] )
311314 }
312315#endif
313316
@@ -404,9 +407,9 @@ public func configurationForEntryPoint(from args: __CommandLineArguments_v0) thr
404407
405408#if canImport(Foundation)
406409 // Event stream output (experimental)
407- if let eventStreamOutputPath = args. experimentalEventStreamOutput {
410+ if let eventStreamOutputPath = args. eventStreamOutputPath {
408411 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
410413 try ? _writeJSONLine ( json, to: file)
411414 }
412415 configuration. eventHandler = { [ oldEventHandler = configuration. eventHandler] event, context in
@@ -489,7 +492,7 @@ func eventHandlerForStreamingEvents(version: Int?, forwardingTo eventHandler: @e
489492 case nil , 0 :
490493 ABIv0 . Record. eventHandler ( forwardingTo: eventHandler)
491494 case let . some( unsupportedVersion) :
492- throw _EntryPointError. invalidArgument ( " --experimental- event-stream-version " , value: " \( unsupportedVersion) " )
495+ throw _EntryPointError. invalidArgument ( " --event-stream-version " , value: " \( unsupportedVersion) " )
493496 }
494497}
495498
0 commit comments