You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UNITTESTS/README.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -69,17 +69,17 @@ pip install "gcovr>=4.1"
69
69
70
70
> In case of running into problems see [troubleshooting](#troubleshooting) section.
71
71
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.
73
73
74
74
### Testing with Mbed CLI
75
75
76
76
```
77
-
mbed unittest
77
+
mbed test --unittests
78
78
```
79
79
80
80
A subset of tests can be run by providing `-r` flag for the tool which runs tests matching a regular expression.
81
81
82
-
e.g. `mbed unittest --run -r features_netsocket`
82
+
e.g. `mbed test --unittests --run -r features_netsocket`
83
83
84
84
### Build manually without Python tools
85
85
@@ -144,7 +144,7 @@ Run ctest dashboard test and create test results:
144
144
145
145
Python tools use gcovr to build code coverage reports. Generate html report `UNITTESTS/build/coverage/index.html` with:
146
146
```
147
-
mbed unittest --coverage html
147
+
mbed test --unittests --coverage html
148
148
```
149
149
150
150
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
211
211
#### Creating unit tests files with Mbed CLI
212
212
213
213
```
214
-
mbed unittest --new <FILEPATH>
214
+
mbed test --unittests --new <FILEPATH>
215
215
```
216
216
217
-
E.g. `mbed unittest --new rtos/Semaphore.cpp`
217
+
E.g. `mbed test --unittests --new rtos/Semaphore.cpp`
218
218
219
219
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.
0 commit comments