Mesa (master): ci/bare-metal: Reset colors at the end of a line of serial output.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 6 20:00:12 UTC 2020


Module: Mesa
Branch: master
Commit: fe61230b38f9eeed590b8e401a716c68796bf373
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe61230b38f9eeed590b8e401a716c68796bf373

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Oct 30 16:31:22 2020 -0700

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 <christian.gmeiner at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7434>

---

 .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()



More information about the mesa-commit mailing list