Skip to content

Commit de3ea52

Browse files
committed
Move SWIFT_TESTING_ENABLED to the right location
1 parent 56c1eff commit de3ea52

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Sources/Commands/Utilities/TestingSupport.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ enum TestingSupport {
189189
env.appendPath(key: "DYLD_LIBRARY_PATH", value: sdkPlatformFrameworksPath.lib.pathString)
190190
}
191191

192+
// We aren't using XCTest's harness logic to run Swift Testing tests.
193+
if library == .xctest {
194+
env["SWIFT_TESTING_ENABLED"] = "0"
195+
}
196+
192197
// Fast path when no sanitizers are enabled.
193198
if sanitizers.isEmpty {
194199
return env
@@ -205,10 +210,6 @@ enum TestingSupport {
205210
}
206211

207212
env["DYLD_INSERT_LIBRARIES"] = runtimes.joined(separator: ":")
208-
209-
if library == .xctest {
210-
env["SWIFT_TESTING_ENABLED"] = "0"
211-
}
212213
return env
213214
#endif
214215
}

0 commit comments

Comments
 (0)