Add environment variable to force keeping ANSI codes

If SOONG_UI_ANSI_OUTPUT is set to a true value force the simple status
output to keep ANSI codes.  This will allow buildbots to collect logs
with ANSI codes in them.  Smart status output is not affected as it
always keeps ANSI codes.

Bug: 147310922
Test: manual
Change-Id: I0b78ceebb65125b8e8dafb4787816fb679d3eb3e
This commit is contained in:
Colin Cross
2021-02-10 13:11:18 -08:00
parent 72a28a6a13
commit 3c0fe0edc0
6 changed files with 22 additions and 11 deletions

View File

@@ -48,7 +48,7 @@ type TestResults struct {
// Run runs a single build command. It emulates the "m" command line by calling into Soong UI directly.
func (t *Test) Run(logsDir string) {
output := terminal.NewStatusOutput(os.Stdout, "", false, false)
output := terminal.NewStatusOutput(os.Stdout, "", false, false, false)
log := logger.New(output)
defer log.Cleanup()