swift-testing icon indicating copy to clipboard operation
swift-testing copied to clipboard

Add an experimental console output prefix option for command-line output.

Open grynspan opened this issue 1 year ago • 1 comments

This PR adds the ability to specify a prefix that should be applied to all output from the command line when using swift test. For example, if you specify the prefix "[WHEE]", then you'll get output like:

[WHEE] ◇ Test run started. [WHEE] ↳ Testing Library Version: ff2775952f346dd94757adffa7f7ba57bcc4b2d1 (modified) [WHEE] ◇ Suite "My suite" started. (etc.)

Since the --experimental-console-output-prefix argument is not recognized by Swift Package Manager, you can also specify the prefix using an environment variable, "SWT_EXPERIMENTAL_CONSOLE_OUTPUT_PREFIX".

Resolves #472. Resolves rdar://129677014.

Checklist:

  • [x] Code and documentation should follow the style of the Style Guide.
  • [x] If public symbols are renamed or modified, DocC references should be updated.

grynspan avatar Jun 12 '24 19:06 grynspan

@swift-ci please test

grynspan avatar Jun 12 '24 19:06 grynspan