regression: only print start-of-test messages if stdout is a tty.

This avoids clutter in non-tty outputs, such as regression emails.
This commit is contained in:
Japheth Lim 2016-02-01 16:26:41 +11:00
parent 625c15626d
commit 25fc04eae0
1 changed files with 3 additions and 2 deletions

View File

@ -220,6 +220,7 @@ def run_test(test, status_queue, verbose=False):
def print_test_line_start(test_name, legacy=False): def print_test_line_start(test_name, legacy=False):
if legacy: if legacy:
return return
if sys.stdout.isatty():
print(" Started %-25s " % (test_name + " ...")) print(" Started %-25s " % (test_name + " ..."))
sys.stdout.flush() sys.stdout.flush()