mirror of https://github.com/ARMmbed/mbed-os.git
A minor routine to take care of parasite symbols that may be left over in the serial read buffer. This happens when a program output wasn't terminated with new line. This also does not affect the test results.
parent
f130a80755
commit
0d4c158505
|
@ -37,6 +37,13 @@ class EchoTest():
|
||||||
selftest.mbed.flush()
|
selftest.mbed.flush()
|
||||||
selftest.notify("HOST: Starting the ECHO test")
|
selftest.notify("HOST: Starting the ECHO test")
|
||||||
result = True
|
result = True
|
||||||
|
|
||||||
|
""" This ensures that there are no parasites left in the serial buffer.
|
||||||
|
"""
|
||||||
|
for i in range(0, 2):
|
||||||
|
selftest.mbed.serial_write("\n")
|
||||||
|
c = selftest.mbed.serial_readline()
|
||||||
|
|
||||||
for i in range(0, self.TEST_LOOP_COUNT):
|
for i in range(0, self.TEST_LOOP_COUNT):
|
||||||
TEST_STRING = str(uuid.uuid4()) + "\n"
|
TEST_STRING = str(uuid.uuid4()) + "\n"
|
||||||
selftest.mbed.serial_write(TEST_STRING)
|
selftest.mbed.serial_write(TEST_STRING)
|
||||||
|
|
Loading…
Reference in New Issue