diff options
author | Edward Hill <ecgh@chromium.org> | 2023-01-10 23:51:35 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-11 19:26:39 +0000 |
commit | b5a80a5c03a1a75ed48baaf582a1567501d742f4 (patch) | |
tree | 4bebbe859fab7adab3e16e903ba69b355eb9b71d | |
parent | 32c498f7240595860fdce5bd1f4ad0693a7d503e (diff) | |
download | chrome-ec-b5a80a5c03a1a75ed48baaf582a1567501d742f4.tar.gz |
util: Improve uart_stress_tester.py
Ignore UTF8 decode errors when reading UART output. We don't care
what data is read while flushing during setup, and any errors during
the test will still be detected and reported.
BUG=b:227228605
BRANCH=none
TEST=uart_stress_tester.py -t 10 -d <raw_ec_uart> <raw_cpu_uart>
Change-Id: Ie12a3d8a4259f50ec38a85777ae0932f56e4dff1
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4153075
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Mark Hasemeyer <markhas@google.com>
-rwxr-xr-x | util/uart_stress_tester.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/uart_stress_tester.py b/util/uart_stress_tester.py index 05976889d6..8abb71d144 100755 --- a/util/uart_stress_tester.py +++ b/util/uart_stress_tester.py @@ -194,7 +194,7 @@ class UartSerial: if self.serial.inWaiting() == 0: time.sleep(1) - return self.serial.read(self.serial.inWaiting()).decode() + return self.serial.read(self.serial.inWaiting()).decode(errors="ignore") def prepare(self): """Prepare the test: |