twister: Make string stripping consistent across handlers

All handlers except QEMU were right-stripping console lines before
checking them. In certain cases where the regex is expecting the
whitespace, this could make the test fail on qemu when it is passing
on something else. Change QEMUHandler to us .rstrip instead of .strip()

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
This commit is contained in:
Øyvind Rønningstad 2023-09-07 13:07:17 +02:00 committed by Fabio Baltieri
parent e11bc94a44
commit fea8caccea

View file

@ -887,7 +887,7 @@ class QEMUHandler(Handler):
# line contains a full line of data output from QEMU
log_out_fp.write(line)
log_out_fp.flush()
line = line.strip()
line = line.rstrip()
logger.debug(f"QEMU ({pid}): {line}")
harness.handle(line)