Bug 1020514 - Make mach colorize lines that start with REFTEST TEST-UNEXPECTED-FAIL etc. r=gps.

This commit is contained in:
Jason Orendorff 2014-06-20 12:01:03 -05:00
parent 81479095ed
commit 96b03e8726

View File

@ -110,6 +110,10 @@ class StructuredTerminalFormatter(StructuredHumanFormatter):
result = s
reftest = s.startswith('REFTEST ')
if reftest:
s = s[8:]
if s.startswith('TEST-PASS'):
result = self.terminal.green(s[0:9]) + s[9:]
elif s.startswith('TEST-UNEXPECTED'):
@ -119,6 +123,9 @@ class StructuredTerminalFormatter(StructuredHumanFormatter):
elif s.startswith('TEST-INFO'):
result = self.terminal.yellow(s[0:9]) + s[9:]
if reftest:
result = 'REFTEST ' + result
return result