Skip to content

Commit 610e35d

Browse files
authored
Merge pull request #8163 from ARMmbed/release-candidate
Release candidate for mbed-os-5.10.0-rc3
2 parents dd2d159 + fb7c802 commit 610e35d

File tree

21 files changed

+108
-40
lines changed

21 files changed

+108
-40
lines changed

TESTS/netsocket/dns/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ Case cases[] = {
178178
#endif
179179
Case("SYNCHRONOUS_DNS", SYNCHRONOUS_DNS),
180180
Case("SYNCHRONOUS_DNS_MULTIPLE", SYNCHRONOUS_DNS_MULTIPLE),
181+
#ifdef MBED_EXTENDED_TESTS
181182
Case("SYNCHRONOUS_DNS_CACHE", SYNCHRONOUS_DNS_CACHE),
183+
#endif
182184
Case("SYNCHRONOUS_DNS_INVALID", SYNCHRONOUS_DNS_INVALID),
183185
};
184186

UNITTESTS/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ set(unittest-includes-base
100100
"${PROJECT_SOURCE_DIR}/../rtos/TARGET_CORTEX"
101101
"${PROJECT_SOURCE_DIR}/../rtos/TARGET_CORTEX/rtx5/Include"
102102
"${PROJECT_SOURCE_DIR}/../cmsis"
103+
"${PROJECT_SOURCE_DIR}/../features/frameworks/nanostack-libservice/mbed-client-libservice/"
103104
)
104105

105106
# Create a list for test suites.

UNITTESTS/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ sudo easy_install pip
4545

4646
### Installing covr
4747

48-
Install gcovr code coverage tool globally with `pip install 'gcovr>=4.1'` or using virtualenv:
48+
Install gcovr code coverage tool globally with `pip install "gcovr>=4.1"` or using virtualenv:
4949

5050
#### virtualenv
5151

@@ -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
@@ -291,4 +291,4 @@ TEST_F(TestSemaphore, constructor)
291291

292292
**Problem:** virus protection identifies files generated by CMake as malicious and quarantines the files on Windows.
293293

294-
* **Solution**: restore the false positive files from the quarantine.
294+
* **Solution**: restore the false positive files from the quarantine.

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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
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
1111
../features/netsocket/NetworkStack.cpp
1212
../features/netsocket/InternetSocket.cpp
13+
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
14+
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
1315
)
1416

1517
set(unittest-test-sources

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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
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
1111
../features/netsocket/InternetSocket.cpp
1212
../features/netsocket/TCPSocket.cpp
13+
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
14+
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
1315
)
1416

1517
set(unittest-test-sources

UNITTESTS/features/netsocket/UDPSocket/unittest.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
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
1111
../features/netsocket/NetworkStack.cpp
1212
../features/netsocket/InternetSocket.cpp
1313
../features/netsocket/UDPSocket.cpp
14+
../features/frameworks/nanostack-libservice/source/libip4string/ip4tos.c
15+
../features/frameworks/nanostack-libservice/source/libip4string/stoip4.c
1416
)
1517

1618
set(unittest-test-sources

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)