- Add _strip_ansi_sequences() to remove terminal formatting characters
from SSH output when using invoke_shell().
- Integrate cleanup in __read_from_channel(), affecting send_as_sudo()
and send_expect_prompts() while preserving exec_command() behavior.
- Centralizes ANSI cleanup logic to ensure clean logs and robust parsing.
Tested:
- Validated across full sanity and sanity_regression suites.
- Compared logs before and after change:
- Over 50 instances of ANSI sequences removed.
- No regressions introduced.
- Verified pass/fail parity across all tests.
Change-Id: I20c8b87b3684742b82cbd29e240d61f17103691a
Signed-off-by: Andrew Vaillancourt <andrew.vaillancourt@windriver.com>