Skip to content

Commit 6dcd9e1

Browse files
committed
Update mbed-cli subcommand
1 parent 6165386 commit 6dcd9e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

UNITTESTS/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ pip install "gcovr>=4.1"
6969

7070
> In case of running into problems see [troubleshooting](#troubleshooting) section.
7171
72-
`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.
72+
`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.
7373

7474
### Testing with Mbed CLI
7575

7676
```
77-
mbed unittest
77+
mbed test --unittests
7878
```
7979

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

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

8484
### Build manually without Python tools
8585

@@ -144,7 +144,7 @@ Run ctest dashboard test and create test results:
144144

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

150150
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.
@@ -211,10 +211,10 @@ A unit test definition file `unittest.cmake` requires variables to be set for a
211211
#### Creating unit tests files with Mbed CLI
212212

213213
```
214-
mbed unittest --new <FILEPATH>
214+
mbed test --unittests --new <FILEPATH>
215215
```
216216

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

219219
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.
220220

0 commit comments

Comments
 (0)