Skip to content

Commit 6f26087

Browse files
committed
Don't recurse when Swift Testing is the library we're using
1 parent 986d01e commit 6f26087

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Sources/Testing/ABI/EntryPoints/EntryPoint.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ func entryPoint(passing args: __CommandLineArguments_v0?, eventHandler: Event.Ha
3939
let args = try args ?? parseCommandLineArguments(from: CommandLine.arguments)
4040

4141
#if !SWT_NO_RUNTIME_LIBRARY_DISCOVERY
42+
// If the user requested a different testing library, run it instead of
43+
// Swift Testing. (If they requested Swift Testing, we're already here so
44+
// there's no real need to recurse).
4245
if args.experimentalListLibraries != true,
43-
let library = args.testingLibrary.flatMap(Library.init(withHint:)) {
46+
let library = args.testingLibrary.flatMap(Library.init(withHint:)),
47+
library.canonicalHint != "swift-testing" {
4448
return await library.callEntryPoint(passing: args)
4549
}
4650
#endif

0 commit comments

Comments
 (0)