Skip to content

Commit 027e030

Browse files
author
Amanda Butler
authored
Edit README.md
Edit readme.
1 parent 4687e50 commit 027e030

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

UNITTESTS/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Unit testing
22

3-
This document describes how to write and test unit tests for Mbed OS. To prevent and solve problems, please see the [troubleshooting](#troubleshooting) section.
3+
This document describes how to write and test unit tests for Arm Mbed OS. To prevent and solve problems, please see the [troubleshooting](#troubleshooting) section.
44

55
### Introduction
66

@@ -16,7 +16,7 @@ Please install the following dependencies to use Mbed OS unit testing.
1616
- Python 2.7.x, 3.5 or newer.
1717
- Pip 10.0 or newer.
1818
- Gcovr 4.1 or newer.
19-
- Mbed CLI 1.8.0 or newer.
19+
- Arm Mbed CLI 1.8.0 or newer.
2020

2121
Detailed instructions for supported operating systems are below.
2222

@@ -30,7 +30,7 @@ Detailed instructions for supported operating systems are below.
3030
sudo easy_install pip
3131
```
3232

33-
1. Install Gcovr and [Mbed CLI](https://os.mbed.com/docs/latest/tools/arm-mbed-cli.html) with `pip install "gcovr>=4.1" mbed-cli`.
33+
1. Install Gcovr and [Mbed CLI](https://os.mbed.com/docs/latest/tools/developing-arm-mbed-cli.html) with `pip install "gcovr>=4.1" mbed-cli`.
3434

3535
#### Installing dependencies on macOS
3636

@@ -43,15 +43,15 @@ Detailed instructions for supported operating systems are below.
4343
sudo easy_install pip
4444
```
4545

46-
1. Install Gcovr and [Mbed CLI](https://os.mbed.com/docs/latest/tools/arm-mbed-cli.html) with `pip install "gcovr>=4.1" mbed-cli`.
46+
1. Install Gcovr and [Mbed CLI](https://os.mbed.com/docs/latest/tools/developing-arm-mbed-cli.html) with `pip install "gcovr>=4.1" mbed-cli`.
4747

4848
#### Installing dependencies on Windows
4949

5050
1. Download and install [MinGW-W64](http://mingw-w64.org/).
5151
1. Download CMake binaries from https://cmake.org/download/, and run the installer.
5252
1. Download Python 2.7 or Python 3 from https://www.python.org/getit/, and run the installer.
5353
1. Add MinGW, CMake and Python into system PATH.
54-
1. Install Gcovr and [Mbed CLI](https://os.mbed.com/docs/latest/tools/arm-mbed-cli.html) with `pip install "gcovr>=4.1" mbed-cli`.
54+
1. Install Gcovr and [Mbed CLI](https://os.mbed.com/docs/latest/tools/developing-arm-mbed-cli.html) with `pip install "gcovr>=4.1" mbed-cli`.
5555

5656
### Test code structure
5757

@@ -69,7 +69,7 @@ The build system automatically generates names of test suites. The name is const
6969

7070
### Unit testing with Mbed CLI
7171

72-
Mbed CLI supports unit tests through `mbed test --unittests` command. For information on using Mbed CLI, please see the [CLI documentation in handbook](https://os.mbed.com/docs/latest/tools/arm-mbed-cli.html).
72+
Mbed CLI supports unit tests through `mbed test --unittests` command. For information on using Mbed CLI, please see the [CLI documentation](https://os.mbed.com/docs/latest/tools/developing-arm-mbed-cli.html).
7373

7474
### Writing unit tests
7575

@@ -154,19 +154,19 @@ TEST_F(TestSemaphore, constructor)
154154

155155
### Building and running unit tests
156156

157-
Use Mbed CLI to build and run unit tests. For advanced use, you can run CMake and a make program directly.
157+
Use Mbed CLI to build and run unit tests. For advanced use, you can run CMake and a Make program directly.
158158

159159
#### Build tests directly with CMake
160160

161161
1. Create a build directory `mkdir UNITTESTS/build`.
162162
1. Move to the build directory `cd UNITTESTS/build`.
163163
1. Run CMake using a relative path to `UNITTESTS` folder as the argument. So from `UNITTESTS/build` use `cmake ..`:
164164
- Add `-g [generator]` if generating other than Unix Makefiles such in case of MinGW use `-g "MinGW Makefiles"`.
165-
- Add `-DCMAKE_MAKE_PROGRAM=<value>`, `-DCMAKE_CXX_COMPILER=<value>` and `-DCMAKE_C_COMPILER=<value>` to use a specific make program and compilers.
165+
- Add `-DCMAKE_MAKE_PROGRAM=<value>`, `-DCMAKE_CXX_COMPILER=<value>` and `-DCMAKE_C_COMPILER=<value>` to use a specific Make program and compilers.
166166
- Add `-DCMAKE_BUILD_TYPE=Debug` to build a debug build.
167167
- Add `-DCOVERAGE=True` to add coverage compiler flags.
168168
- See the [CMake manual](https://cmake.org/cmake/help/v3.0/manual/cmake.1.html) for more information.
169-
1. Run a make program to build the tests.
169+
1. Run a Make program to build the tests.
170170

171171
#### Run tests directly with CTest
172172

@@ -181,22 +181,22 @@ Run a test binary in the build directory to run a unit test suite. To run multip
181181

182182
### Debugging
183183

184-
1. Use Mbed CLI to build a debug build. For advanced use, run CMake directly with `-DCMAKE_BUILD_TYPE=Debug` and then run a make program.
184+
1. Use Mbed CLI to build a debug build. For advanced use, run CMake directly with `-DCMAKE_BUILD_TYPE=Debug`, and then run a Make program.
185185
1. Run GDB with a test executable as an argument to debug unit tests.
186186

187187
### Get code coverage
188188

189189
Use Mbed CLI to generate code coverage reports. For advanced use, follow these steps:
190190

191191
1. Run CMake with both `-DCMAKE_BUILD_TYPE=Debug` and `-DCOVERAGE=True`.
192-
1. Run a make program to build the tests.
192+
1. Run a Make program to build the tests.
193193
1. Run the tests.
194194
1. Run Gcovr or any other code coverage tool directly in the build directory.
195195

196196
### Troubleshooting
197197

198198
**Problem:** Generic problems with CMake or with the build process.
199-
* **Solution**: Delete the build directory. Make sure that CMake, g++, gcc and a make program can be found in the path and are correct versions.
199+
* **Solution**: Delete the build directory. Make sure that CMake, g++, GCC and a Make program can be found in the path and are correct versions.
200200

201201
**Problem:** Virus protection identifies files generated by CMake as malicious and quarantines the files on Windows.
202202
* **Solution**: Restore the false positive files from the quarantine.

0 commit comments

Comments
 (0)