Skip to content

Commit 73a60ae

Browse files
committed
Add advanced console output recorder with progress bar and hierarchical tree display
1 parent b067a9a commit 73a60ae

File tree

8 files changed

+716
-435
lines changed

8 files changed

+716
-435
lines changed

Sources/Testing/ABI/EntryPoints/EntryPoint.swift

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@ func entryPoint(passing args: __CommandLineArguments_v0?, eventHandler: Event.Ha
5151
}
5252
configuration.verbosity = args.verbosity
5353

54-
#if !SWT_NO_FILE_IO
55-
// Configure the event recorder to write events to stderr.
56-
if configuration.verbosity > .min {
57-
// Use the advanced console output recorder for hierarchical display
54+
if configuration.verbosity >= 0 {
5855
var advancedOptions = Event.AdvancedConsoleOutputRecorder.Options()
5956
advancedOptions.base = .for(.stderr)
57+
58+
advancedOptions.base.useANSIEscapeCodes = true
59+
advancedOptions.base.ansiColorBitDepth = 24
60+
#if os(macOS)
61+
advancedOptions.base.useSFSymbols = true
62+
#endif
63+
6064
advancedOptions.useHierarchicalOutput = true
6165

6266
let eventRecorder = Event.AdvancedConsoleOutputRecorder(options: advancedOptions) { string in
@@ -68,7 +72,6 @@ func entryPoint(passing args: __CommandLineArguments_v0?, eventHandler: Event.Ha
6872
eventRecorder.handle(event, in: context)
6973
}
7074
}
71-
#endif
7275

7376
// If the caller specified an alternate event handler, hook it up too.
7477
if let eventHandler {

0 commit comments

Comments
 (0)