Skip to content

Commit 356ea21

Browse files
Qinghao ShiSeppo Takalo
authored andcommitted
Add log compare test for socket example
1 parent 31bcdd3 commit 356ea21

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Testing examples
2+
3+
Examples are tested using tool [htrun](https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-host-tests) and templated print log.
4+
5+
To run the test, use following command after you build the example:
6+
```
7+
mbedhtrun -d D: -p COM4 -m K64F -f .\BUILD\K64F\GCC_ARM\sockets.bin --compare-log tests\sockets.log
8+
```
9+
10+
11+
More details about `htrun` are [here](https://github.com/ARMmbed/htrun#testing-mbed-os-examples).
12+

tests/sockets.log

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Mbed OS Socket example
2+
Mbed OS version:
3+
4+
IP address: (?:[0-9]{1,3}\.){3}[0-9]{1,3}
5+
Netmask: (?:[0-9]{1,3}\.){3}[0-9]{1,3}
6+
Gateway: (?:[0-9]{1,3}\.){3}[0-9]{1,3}
7+
sent \d+ \[GET \/ HTTP\/\d.\d\]
8+
recv \d+ \[HTTP\/\d.\d \d+ OK\]
9+
Done

0 commit comments

Comments
 (0)