Skip to content

Unittesting: Update Mbed CLI subcommand in Readme #7985

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 1 commit into from
Sep 6, 2018
Merged
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: 6 additions & 6 deletions UNITTESTS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ pip install "gcovr>=4.1"

> In case of running into problems see [troubleshooting](#troubleshooting) section.

`UNITTESTS/mbed_unittest.py` contains testing scripts for Mbed OS unit testing. Mbed CLI supports unit testing through `mbed unittest` command with the same arguments.
`UNITTESTS/mbed_unittest.py` contains testing scripts for Mbed OS unit testing. Mbed CLI supports unit testing through `mbed test --unittests` command with the same arguments.

### Testing with Mbed CLI

```
mbed unittest
mbed test --unittests
```

A subset of tests can be run by providing `-r` flag for the tool which runs tests matching a regular expression.

e.g. `mbed unittest --run -r features_netsocket`
e.g. `mbed test --unittests --run -r features_netsocket`

### Build manually without Python tools

Expand Down Expand Up @@ -144,7 +144,7 @@ Run ctest dashboard test and create test results:

Python tools use gcovr to build code coverage reports. Generate html report `UNITTESTS/build/coverage/index.html` with:
```
mbed unittest --coverage html
mbed test --unittests --coverage html
```

To get coverage for a single test suite, run gcovr separately for suite coverage data directory. See [gcovr documentation](https://gcovr.com/guide.html#filter-options) for more information.
Expand Down Expand Up @@ -211,10 +211,10 @@ A unit test definition file `unittest.cmake` requires variables to be set for a
#### Creating unit tests files with Mbed CLI

```
mbed unittest --new <FILEPATH>
mbed test --unittests --new <FILEPATH>
```

E.g. `mbed unittest --new rtos/Semaphore.cpp`
E.g. `mbed test --unittests --new rtos/Semaphore.cpp`

The generator script only creates the files required for a unit test. It does not write unit tests automatically nor does it handle source dependencies.

Expand Down