Skip to content

Commit

Permalink
[nrf fromtree] scripts: pylib: twister: fix missing newlines at handl…
Browse files Browse the repository at this point in the history
…er.log

Keep new lines at handler.log.

(cherry picked from commit f0bfaa4)

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
  • Loading branch information
nordic-piks authored and rlubos committed Sep 5, 2024
1 parent 64df519 commit 97b2b53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/pylib/twister/twisterlib/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def monitor_serial(self, ser, halt_event, harness):
# is available yet.
if serial_line:
# can be more lines in serial_line so split them before handling
for sl in serial_line.decode('utf-8', 'ignore').splitlines():
for sl in serial_line.decode('utf-8', 'ignore').splitlines(keepends=True):
log_out_fp.write(strip_ansi_sequences(sl).encode('utf-8'))
log_out_fp.flush()
if sl := sl.strip():
Expand Down

0 comments on commit 97b2b53

Please sign in to comment.