Skip to content

Commit 0b8957a

Browse files
authored
Merge pull request #173 from jamesbeyond/test
add log compare test for blinky example
2 parents b8eb7eb + 59773da commit 0b8957a

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-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\blinky.bin --compare-log tests\blinky.log
8+
```
9+
10+
11+
More details about `htrun` are [here](https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-host-tests#testing-mbed-os-examples).
12+

tests/blinky.log

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
=============================== SYSTEM INFO ================================
2+
Mbed OS Version:
3+
CPU ID: 0x[0-9a-fA-F]+
4+
Compiler ID: 1
5+
Compiler Version:
6+
================= CPU STATS =================
7+
Idle: \d+% Usage: \d+%
8+
================ HEAP STATS =================
9+
Current heap: \d+
10+
Max heap size: \d+
11+
================ THREAD STATS ===============
12+
ID: 0x[0-9a-fA-F]+
13+
Name: main
14+
State: \d+
15+
Priority: \d+
16+
Stack Size: \d+
17+
Stack Space: \d+
18+
ID: 0x[0-9a-fA-F]+
19+
Name: rtx_idle
20+
State: \d+
21+
Priority: \d+
22+
Stack Size: \d+
23+
Stack Space: \d+
24+
ID: 0x[0-9a-fA-F]+
25+
Name: rtx_timer
26+
State: \d+
27+
Priority: \d+
28+
Stack Size: \d+
29+
Stack Space: \d+

0 commit comments

Comments
 (0)