Skip to content

add log compare test for blinky example #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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+