Skip to content

Commit ae0a5d5

Browse files
committed
Suppress failure summary if verbosity == .min
1 parent d8cfaed commit ae0a5d5

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Sources/Testing/Events/Recorder/Event.ConsoleOutputRecorder.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,12 @@ extension Event.ConsoleOutputRecorder {
350350
write(lines.joined())
351351

352352
// Print failure summary when run ends, unless an environment variable is
353-
// set to explicitly disable it. The summary is printed after the main
354-
// output so it appears at the very end of the console output.
355-
if case .runEnded = event.kind, Environment.flag(named: "SWT_FAILURE_SUMMARY_ENABLED") != false {
353+
// set to explicitly disable it or verbosity is set to the lowest value. The
354+
// summary is printed after the main output so it appears at the very end of
355+
// the console output.
356+
if case .runEnded = event.kind,
357+
Environment.flag(named: "SWT_FAILURE_SUMMARY_ENABLED") != false,
358+
context.configuration?.verbosity != .min {
356359
if let summary = _humanReadableOutputRecorder.generateFailureSummary(options: options) {
357360
// Add blank line before summary for visual separation
358361
write("\n\(summary)")

0 commit comments

Comments
 (0)