@@ -325,9 +325,10 @@ public struct SwiftTestCommand: AsyncSwiftCommand {
325
325
326
326
// Run Swift Testing (parallel or not, it has a single entry point.)
327
327
if options. testLibraryOptions. isEnabled ( . swiftTesting) {
328
- if options. testLibraryOptions. isExplicitlyEnabled ( . swiftTesting) != true ,
329
- let testEntryPointPath = testProducts. lazy. compactMap ( \. testEntryPointPath) . first {
330
- // Cannot run Swift Testing because an entry point file was used.
328
+ if let testEntryPointPath = testProducts. lazy. compactMap ( \. testEntryPointPath) . first,
329
+ options. testLibraryOptions. isExplicitlyEnabled ( . swiftTesting) == nil {
330
+ // Cannot run Swift Testing because an entry point file was used, and the developer
331
+ // didn't explicitly enable Swift Testing.
331
332
swiftCommandState. observabilityScope. emit (
332
333
debug: " Skipping automatic Swift Testing invocation because a test entry point path is present: \( testEntryPointPath) "
333
334
)
@@ -733,9 +734,10 @@ extension SwiftTestCommand {
733
734
}
734
735
735
736
if testLibraryOptions. isEnabled ( . swiftTesting) {
736
- if testLibraryOptions. isExplicitlyEnabled ( . swiftTesting) != true ,
737
- let testEntryPointPath = testProducts. lazy. compactMap ( \. testEntryPointPath) . first {
738
- // Cannot run Swift Testing because an entry point file was used.
737
+ if let testEntryPointPath = testProducts. lazy. compactMap ( \. testEntryPointPath) . first,
738
+ testLibraryOptions. isExplicitlyEnabled ( . swiftTesting) == nil {
739
+ // Cannot run Swift Testing because an entry point file was used, and the developer
740
+ // didn't explicitly enable Swift Testing.
739
741
swiftCommandState. observabilityScope. emit (
740
742
debug: " Skipping automatic Swift Testing invocation (list) because a test entry point path is present: \( testEntryPointPath) "
741
743
)
0 commit comments