[[[
Disable ANSI color for dumb terminals, format terminal test output.
* build/run_tests.py
(TestHarness): Add test condition, format terminal output.
]]]
I disabled color conditionally for dumb terminals because the control
characters are displayed in the raw in those.
Index: build/run_tests.py
===================================================================
--- build/run_tests.py (revision 1463012)
+++ build/run_tests.py (working copy)
@@ -178,7 +178,8 @@ class TestHarness:
self.log = None
self.ssl_cert = ssl_cert
self.http_proxy = http_proxy
- if not sys.stdout.isatty() or sys.platform == 'win32':
+ if not sys.stdout.isatty() or sys.platform == 'win32' or \
+ os.getenv("TERM") == "dumb":
TextColors.disable()
def run(self, list):
@@ -565,7 +566,8 @@ class TestHarness:
progdir, progbase = os.path.split(prog)
if self.log:
# Using write here because we don't want even a trailing space
- test_info = '[%s/%d] %s' % (str(test_nr + 1).zfill(len(str(total_tests))),
+ test_info = '[%s/%d] %-35s' % \
+ (str(test_nr + 1).zfill(len(str(total_tests))),
total_tests, progbase)
if self.list_tests:
sys.stdout.write('Listing tests in %s' % (test_info, ))