Skip to content

Commit 8717d78

Browse files
committed
[Parsable Output] Add batch job message generation tests
1 parent ce0df8c commit 8717d78

File tree

2 files changed

+328
-62
lines changed

2 files changed

+328
-62
lines changed

Sources/SwiftDriver/Driver/ToolExecutionDelegate.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ import Glibc
2323
#endif
2424

2525
/// Delegate for printing execution information on the command-line.
26-
final class ToolExecutionDelegate: JobExecutionDelegate {
26+
@_spi(Testing) public final class ToolExecutionDelegate: JobExecutionDelegate {
2727
/// Quasi-PIDs are _negative_ PID-like unique keys used to
2828
/// masquerade batch job constituents as (quasi)processes, when writing
2929
/// parseable output to consumers that don't understand the idea of a batch
3030
/// job. They are negative in order to avoid possibly colliding with real
3131
/// PIDs (which are always positive). We start at -1000 here as a crude but
3232
/// harmless hedge against colliding with an errno value that might slip
33-
/// into the stream of real PIDs (say, due to a TaskQueue bug).
33+
/// into the stream of real PIDs.
3434
static let QUASI_PID_START = -1000
3535

3636
public enum Mode {
@@ -50,12 +50,12 @@ final class ToolExecutionDelegate: JobExecutionDelegate {
5050
private let argsResolver: ArgsResolver
5151
private var batchJobInputQuasiPIDMap = DictionaryOfDictionaries<Job, TypedVirtualPath, Int>()
5252

53-
init(mode: ToolExecutionDelegate.Mode,
54-
buildRecordInfo: BuildRecordInfo?,
55-
incrementalCompilationState: IncrementalCompilationState?,
56-
showJobLifecycle: Bool,
57-
argsResolver: ArgsResolver,
58-
diagnosticEngine: DiagnosticsEngine) {
53+
@_spi(Testing) public init(mode: ToolExecutionDelegate.Mode,
54+
buildRecordInfo: BuildRecordInfo?,
55+
incrementalCompilationState: IncrementalCompilationState?,
56+
showJobLifecycle: Bool,
57+
argsResolver: ArgsResolver,
58+
diagnosticEngine: DiagnosticsEngine) {
5959
self.mode = mode
6060
self.buildRecordInfo = buildRecordInfo
6161
self.incrementalCompilationState = incrementalCompilationState

0 commit comments

Comments
 (0)