From fe61230b38f9eeed590b8e401a716c68796bf373 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 30 Oct 2020 16:31:22 -0700 Subject: [PATCH] ci/bare-metal: Reset colors at the end of a line of serial output. We don't want the next line of our timestamp and other context to inherit colors set by the serial command (visible with the new dEQP runner) Reviewed-by: Christian Gmeiner Part-of: --- .gitlab-ci/bare-metal/serial_buffer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/bare-metal/serial_buffer.py b/.gitlab-ci/bare-metal/serial_buffer.py index f697f63916a..0d2ce8ef5d3 100755 --- a/.gitlab-ci/bare-metal/serial_buffer.py +++ b/.gitlab-ci/bare-metal/serial_buffer.py @@ -109,8 +109,8 @@ class SerialBuffer: line = line.decode(errors="replace") time = datetime.now().strftime('%y-%m-%d %H:%M:%S') - print("{time} {prefix}{line}".format( - time=time, prefix=self.prefix, line=line), flush=True, end='') + print("{time} {prefix}{line}{endc}".format( + time=time, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='') self.line_queue.put(line) line = bytearray()