Skip to content

Commit

Permalink
Merge pull request #173 from jamesbeyond/test
Browse files Browse the repository at this point in the history
add log compare test for blinky example
  • Loading branch information
0xc0170 committed May 15, 2019
2 parents b8eb7eb + 59773da commit 0b8957a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/README.md
@@ -0,0 +1,12 @@
# Testing examples

Examples are tested using tool [htrun](https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-host-tests) and templated print log.

To run the test, use following command after you build the example:
```
mbedhtrun -d D: -p COM4 -m K64F -f .\BUILD\K64F\GCC_ARM\blinky.bin --compare-log tests\blinky.log
```


More details about `htrun` are [here](https://github.com/ARMmbed/mbed-os-tools/tree/master/packages/mbed-host-tests#testing-mbed-os-examples).

29 changes: 29 additions & 0 deletions tests/blinky.log
@@ -0,0 +1,29 @@
=============================== SYSTEM INFO ================================
Mbed OS Version:
CPU ID: 0x[0-9a-fA-F]+
Compiler ID: 1
Compiler Version:
================= CPU STATS =================
Idle: \d+% Usage: \d+%
================ HEAP STATS =================
Current heap: \d+
Max heap size: \d+
================ THREAD STATS ===============
ID: 0x[0-9a-fA-F]+
Name: main
State: \d+
Priority: \d+
Stack Size: \d+
Stack Space: \d+
ID: 0x[0-9a-fA-F]+
Name: rtx_idle
State: \d+
Priority: \d+
Stack Size: \d+
Stack Space: \d+
ID: 0x[0-9a-fA-F]+
Name: rtx_timer
State: \d+
Priority: \d+
Stack Size: \d+
Stack Space: \d+

0 comments on commit 0b8957a

Please sign in to comment.