Skip to content

Commit

Permalink
Merge pull request ARMmbed#276 from jamesbeyond/add_test
Browse files Browse the repository at this point in the history
add compare log test
  • Loading branch information
pan- committed Jan 17, 2020
2 parents 98e75c7 + fdd9c4f commit 6a85f80
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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:
```bash
$ mbedhtrun -d <MOUNT_POINT> -p <SERIAL_PORT> -m <TARGET> -f ./BUILD/<TARGET>/<TOOLCHAIN>/<BUILT_IMAGE> --compare-log tests/<LOG_FILE>
```
For example:
```bash
$ mbedhtrun -d /media/user01/DAPLINK -p /dev/ttyACM0 -m DISCO_L475VG_IOT01A -f ./BUILD/DISCO_L475VG_IOT01A/GCC_ARM/mbed-os-example-ble.bin --compare-log tests/broadcast.log
```


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

1 change: 1 addition & 0 deletions tests/broadcast.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEVICE MAC ADDRESS: ([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}

0 comments on commit 6a85f80

Please sign in to comment.