Skip to content

Commit 2e5e23f

Browse files
author
Cruz Monrreal
authored
Merge pull request #8066 from bridadan/move_unittest_paths_to_hyphens
Move unittest paths to hyphens
2 parents d6ccf46 + 0bda46d commit 2e5e23f

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

UNITTESTS/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ mbed test --unittests
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 test --unittests --run -r features_netsocket`
82+
e.g. `mbed test --unittests --run -r features-netsocket`
8383

8484
### Build manually without Python tools
8585

@@ -105,7 +105,7 @@ mingw32-make
105105

106106
#### Custom CMake variables
107107

108-
Usage:
108+
Usage:
109109
`cmake [RELATIVE PATH TO UNITTESTS DIR] [OPTIONS]`
110110

111111
Keyword variables (usage `cmake -D<VARIABLE>(:<TYPE>)=<value>`:
@@ -157,17 +157,17 @@ mkdir UNITTESTS/build
157157
cd UNITTESTS/build
158158
cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE:STRING=html ..
159159
make
160-
./features_netsocket_InternetSocket
161-
gcovr -r ../.. --html --html-detail -o ./index.html ./CMakeFiles/features_netsocket_InternetSocket.MbedOS.dir/
160+
./features-netsocket-InternetSocket
161+
gcovr -r ../.. --html --html-detail -o ./index.html ./CMakeFiles/features-netsocket-InternetSocket.MbedOS.dir/
162162
```
163163
Windows:
164164
```
165165
mkdir UNITTESTS/build
166166
cd UNITTESTS/build
167167
cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE:STRING=html -g "MinGW Makefiles" ..
168168
mingw32-make
169-
features_netsocket_InternetSocket.exe
170-
gcovr -r ..\.. --html --html-detail -o .\index.html .\CMakeFiles\features_netsocket_InternetSocket.MbedOS.dir\
169+
features-netsocket-InternetSocket.exe
170+
gcovr -r ..\.. --html --html-detail -o .\index.html .\CMakeFiles\features-netsocket-InternetSocket.MbedOS.dir\
171171
```
172172

173173
## The structure of unit tests
@@ -203,7 +203,7 @@ Each class to be tested requires two files for unit testing:
203203

204204
A unit test definition file `unittest.cmake` requires variables to be set for a test to be configured. File source paths in `unittest.cmake` files need to be relative to the unit test folder and `CMakeLists.txt`.
205205

206-
* **TEST_SUITE_NAME** - Identifier for the test suite. Use naming convention *PATH_TO_THE_TESTABLE_FILE* e.g. *features_netsocket_InternetSocket*
206+
* **TEST_SUITE_NAME** - Identifier for the test suite. Use naming convention *PATH_TO_THE_TESTABLE_FILE* e.g. *features-netsocket-InternetSocket*
207207
* **unittest-includes** - Include paths for headers needed to build the tests in addition to the base include paths listed in [CMakeLists.txt](CMakeLists.txt). Optional.
208208
* **unittest-sources** - Mbed OS source files and stubs included for the build.
209209
* **unittest-test-sources** - Unit test source files.
@@ -225,7 +225,7 @@ For example to create a unit test for `rtos/Semaphore.cpp`:
225225
1. Create a directory for unit test files in `UNITTESTS/rtos/Semaphore`.
226226
2. Create a test definition file `UNITTESTS/rtos/Semaphore/unittest.cmake` with the following content:
227227
```
228-
set(TEST_SUITE_NAME "rtos_Semaphore")
228+
set(TEST_SUITE_NAME "rtos-Semaphore")
229229
230230
set(unittest-sources
231231
stubs/mbed_assert.c

UNITTESTS/features/cellular/framework/AT/AT_CellularBase/unittest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
####################
55

66
# Unit test suite name
7-
set(TEST_SUITE_NAME "cellular_framework_AT_AT_CellularBase")
7+
set(TEST_SUITE_NAME "cellular-framework-AT-AT_CellularBase")
88

99
# Add test specific include paths
1010
set(unittest-includes ${unittest-includes}

UNITTESTS/features/cellular/framework/common/util/unittest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
####################
55

66
# Unit test suite name
7-
set(TEST_SUITE_NAME "cellular_framework_common_util")
7+
set(TEST_SUITE_NAME "cellular-framework-common-util")
88

99
# Add test specific include paths
1010
set(unittest-includes ${unittest-includes}

UNITTESTS/features/netsocket/InternetSocket/unittest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
####################
55

66
# Unit test suite name
7-
set(TEST_SUITE_NAME "features_netsocket_InternetSocket")
7+
set(TEST_SUITE_NAME "features-netsocket-InternetSocket")
88

99
set(unittest-sources
1010
../features/netsocket/SocketAddress.cpp

UNITTESTS/features/netsocket/NetworkInterface/unittest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
####################
55

66
# Unit test suite name
7-
set(TEST_SUITE_NAME "features_netsocket_NetworkInterface")
7+
set(TEST_SUITE_NAME "features-netsocket-NetworkInterface")
88

99
# Source files
1010
set(unittest-sources

UNITTESTS/features/netsocket/TCPSocket/unittest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
####################
55

66
# Unit test suite name
7-
set(TEST_SUITE_NAME "features_netsocket_TCPSocket")
7+
set(TEST_SUITE_NAME "features-netsocket-TCPSocket")
88

99
set(unittest-sources
1010
../features/netsocket/SocketAddress.cpp

UNITTESTS/features/netsocket/UDPSocket/unittest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
####################
55

66
# Unit test suite name
7-
set(TEST_SUITE_NAME "features_netsocket_UDPSocket")
7+
set(TEST_SUITE_NAME "features-netsocket-UDPSocket")
88

99
set(unittest-sources
1010
../features/netsocket/SocketAddress.cpp

UNITTESTS/platform/CircularBuffer/unittest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
####################
55

66
# Unit test suite name
7-
set(TEST_SUITE_NAME "platform_CircularBuffer")
7+
set(TEST_SUITE_NAME "platform-CircularBuffer")
88

99
set(unittest-sources
1010
)

0 commit comments

Comments
 (0)