Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions score/itf/core/process/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ def try_to_encode(data, encoding="ascii"):
def try_to_decode(data, encoding="ascii"):
if isinstance(data, bytes):
data = re.sub(b"\r[^\n]", b"", data)
# Strip VT100 DEC Private Mode sequences (e.g. \e[?7l disabling auto-wrap)
# that corrupt the terminal when Bazel replays captured test output.
data = re.sub(b"\033\\[\\?[0-9;]*[hl]", b"", data)
return data.decode(encoding, "replace").rstrip("\n").rstrip("\r")
if isinstance(data, str):
return data.rstrip("\n").rstrip("\r")
Expand Down
3 changes: 0 additions & 3 deletions scripts/run_under_qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

set -euo pipefail

# Restore terminal auto-margin setting, corrupted by QEMU output
trap 'tput -T xterm smam 2>/dev/null || true' EXIT

# Check if TEST_UNDECLARED_OUTPUTS_DIR is set
CMD_UNDECLARED_OUTPUTS_DIR="true"
if [[ -n "${TEST_UNDECLARED_OUTPUTS_DIR:-}" ]]; then
Expand Down
Loading