File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
libraries/tests/mbed/echo
workspace_tools/host_tests Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,13 @@ int main() {
22
22
23
23
Serial pc (TXPIN, RXPIN);
24
24
pc.baud (115200 );
25
+
26
+ pc.puts (" {{" );
25
27
pc.puts (TEST_ENV_START); // Host test is expecting preamble
28
+ pc.puts (" }}" );
26
29
27
30
while (1 ) {
28
31
pc.gets (buf, 256 );
29
-
30
32
pc.printf (" %s" , buf);
31
33
}
32
34
}
Original file line number Diff line number Diff line change 15
15
limitations under the License.
16
16
"""
17
17
import uuid
18
+ from sys import stdout
18
19
from host_test import Test
19
20
20
21
@@ -28,12 +29,18 @@ def test(self):
28
29
# Let's wait for Mbed to print its readiness, usually "{{start}}"
29
30
if self .mbed .serial_timeout (None ) is None :
30
31
self .print_result ("ioerr_serial" )
31
- return
32
+ return
32
33
33
34
c = self .mbed .serial_read (len ('{{start}}' ))
34
35
if c is None :
35
36
self .print_result ("ioerr_serial" )
36
37
return
38
+ print c
39
+ stdout .flush ()
40
+
41
+ if self .mbed .serial_timeout (1 ) is None :
42
+ self .print_result ("ioerr_serial" )
43
+ return
37
44
38
45
self .mbed .flush ()
39
46
self .notify ("Starting the ECHO test" )
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ def run(self):
37
37
if c is None :
38
38
self .print_result ("ioerr_serial" )
39
39
return
40
+ print c
41
+ stdout .flush ()
42
+
43
+ if self .mbed .serial_timeout (1 ) is None :
44
+ self .print_result ("ioerr_serial" )
45
+ return
40
46
41
47
for i in range (1 , 5 ):
42
48
random_integer = random .randint (- 99999 , 99999 )
@@ -64,7 +70,7 @@ def run(self):
64
70
stdout .flush ()
65
71
break
66
72
else :
67
- print "Error: No IP and port information sent from server "
73
+ print "Error: No data from MUT sent"
68
74
self .print_result ('error' )
69
75
exit (- 2 )
70
76
You can’t perform that action at this time.
0 commit comments