mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
validate:launcher: Do not print passing tests if not running in a tty
This commit is contained in:
parent
25e0694d1e
commit
35003bc25b
1 changed files with 8 additions and 4 deletions
|
@ -569,11 +569,15 @@ class Test(Loggable):
|
|||
message = "%s %s: %s%s" % (self.number, self.classname, self.result,
|
||||
" (" + self.message + ")" if self.message else "")
|
||||
end = "\r"
|
||||
term_width = shutil.get_terminal_size((80, 20))[0]
|
||||
if len(message) > term_width:
|
||||
message = message[0:term_width - 2] + '…'
|
||||
if sys.stdout.isatty():
|
||||
term_width = shutil.get_terminal_size((80, 20))[0]
|
||||
if len(message) > term_width:
|
||||
message = message[0:term_width - 2] + '…'
|
||||
else:
|
||||
message = None
|
||||
|
||||
printc(message, color=utils.get_color_for_result(self.result), end=end)
|
||||
if message is not None:
|
||||
printc(message, color=utils.get_color_for_result(self.result), end=end)
|
||||
self.close_logfile()
|
||||
|
||||
if self.options.dump_on_failure:
|
||||
|
|
Loading…
Reference in a new issue