Skip to content

Commit 067a2b2

Browse files
authored
filter out expected signals when logging test crashing (#6968)
motivation: nicer user experience when terminating tests changes: filter out logging of signal used when terminating tests normally radar/113751498
1 parent e36943b commit 067a2b2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Sources/Commands/SwiftTestTool.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ import ArgumentParser
1414
import Basics
1515
import CoreCommands
1616
import Dispatch
17-
import class Foundation.JSONDecoder
18-
import class Foundation.NSLock
19-
import class Foundation.ProcessInfo
17+
import Foundation
2018
import PackageGraph
2119
import PackageModel
2220
import SPMBuildCore
@@ -698,8 +696,8 @@ final class TestRunner {
698696
case .terminated(code: 0):
699697
return true
700698
#if !os(Windows)
701-
case .signalled(let signal):
702-
testObservabilityScope.emit(error: "Exited with signal code \(signal)")
699+
case .signalled(let signal) where ![SIGINT, SIGKILL, SIGTERM].contains(signal):
700+
testObservabilityScope.emit(error: "Exited with unexpected signal code \(signal)")
703701
return false
704702
#endif
705703
default:

0 commit comments

Comments
 (0)