diff options
author | Namyoon Woo <namyoon@chromium.org> | 2019-07-10 13:57:40 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-07-18 22:42:02 +0000 |
commit | d5a4014a7c9331e099d0eaeb8974e53841395ea3 (patch) | |
tree | c5d91d630da685d0fc6dab1c7b5ba94dc31d1aad /driver/ppc/sn5s330.c | |
parent | 2e24a0b7e37d80aac75a6b9ceffbfc463456df7c (diff) | |
download | chrome-ec-d5a4014a7c9331e099d0eaeb8974e53841395ea3.tar.gz |
util: uart_stress_tester raises an error on character loss
This patch let the tester exit with an error code on test failure.
It would make easy the future autotest to detect a failure.
BUG=None
BRANCH=None
TEST=ran on fleex.
$ uart_stress_tester.py /dev/ttyUSB1 /dev/ttyUSB2 -t 120 -d
[before patch]
...
INFO | UartSerial| EC | 14888 char lost / 1382400 (1.1 %)
INFO | UartSerial| AP | 0 char lost / 1382400 (0.0 %)
ERROR | ChargenTest | FAIL: lost 14888 character(s) from the test
...
$ echo $?
0
[after patch]
...
INFO | UartSerial| EC | 14888 char lost / 1382400 (1.1 %)
INFO | UartSerial| AP | 0 char lost / 1382400 (0.0 %)
ERROR | ChargenTest | FAIL: lost 14888 character(s) from the test
Error: Test failed for losing 144888 character(s)
...
$ echo $?
1
$ ./util/uart_stress_tester.py /dev/ttyUSB1 /dev/ttyUSB2 -t 120 -d
Error: /dev/ttyUSB1 does not exist.
$ echo $?
1
Change-Id: I210efd4ad7fdb8eb612206624eda6c39c5bb3b1c
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1696115
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/ppc/sn5s330.c')
0 files changed, 0 insertions, 0 deletions