diff --git a/.travis.yml b/.travis.yml index 740f4ad85fd..e1e6995bafb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -138,7 +138,7 @@ matrix: - ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform - ./tools/test/travis-ci/doxy-spellchecker/spell.sh events - ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos - - ./tools/test/travis-ci/doxy-spellchecker/spell.sh features/netsocket + - ./tools/test/travis-ci/doxy-spellchecker/spell.sh connectivity/netsocket - <<: *docs-vm name: "doxygen" @@ -249,7 +249,7 @@ matrix: - sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' ${EVENTS}/README.md > main.cpp - | rm -r rtos/source/TARGET_CORTEX drivers/source/usb connectivity/cellular connectivity/drivers/cellular \ - connectivity/libraries/ppp features/netsocket features/nanostack features/lwipstack features/frameworks/greentea-client \ + connectivity/libraries/ppp connectivity/netsocket features/nanostack features/lwipstack features/frameworks/greentea-client \ features/frameworks/utest features/frameworks/unity components BUILD - python tools/make.py -t GCC_ARM -m NUCLEO_F103RB --source=. --build=BUILD/NUCLEO_F103RB/GCC_ARM -j0 # Run local equeue tests diff --git a/UNITTESTS/CMakeLists.txt b/UNITTESTS/CMakeLists.txt index 9309fe8ec56..ca55a6c763f 100644 --- a/UNITTESTS/CMakeLists.txt +++ b/UNITTESTS/CMakeLists.txt @@ -112,7 +112,6 @@ set(unittest-includes-base "${PROJECT_SOURCE_DIR}/stubs" "${PROJECT_SOURCE_DIR}/.." "${PROJECT_SOURCE_DIR}/../features" - "${PROJECT_SOURCE_DIR}/../features/netsocket" "${PROJECT_SOURCE_DIR}/../platform" "${PROJECT_SOURCE_DIR}/../storage/filesystem/littlefs/include" "${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include" @@ -128,6 +127,7 @@ set(unittest-includes-base "${PROJECT_SOURCE_DIR}/../features/frameworks/mbed-trace" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice/mbed-client-libservice" + "${PROJECT_SOURCE_DIR}/../connectivity/netsocket/include" "${PROJECT_SOURCE_DIR}/../features/filesystem/fat" "${PROJECT_SOURCE_DIR}/../features/filesystem/fat/ChaN" "${PROJECT_SOURCE_DIR}/../features/filesystem/bd" diff --git a/UNITTESTS/features/netsocket/DTLSSocket/unittest.cmake b/UNITTESTS/features/netsocket/DTLSSocket/unittest.cmake deleted file mode 100644 index e3d1872d09d..00000000000 --- a/UNITTESTS/features/netsocket/DTLSSocket/unittest.cmake +++ /dev/null @@ -1,44 +0,0 @@ - -#################### -# UNIT TESTS -#################### - -set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/InternetSocket.cpp - ../features/netsocket/InternetDatagramSocket.cpp - ../features/netsocket/UDPSocket.cpp - ../features/netsocket/DTLSSocket.cpp - ../features/netsocket/DTLSSocketWrapper.cpp - ../features/netsocket/TLSSocketWrapper.cpp - ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c - ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c - ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c - ../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c - ../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c -) - -set(unittest-test-sources - features/netsocket/DTLSSocket/test_DTLSSocket.cpp - stubs/Mutex_stub.cpp - stubs/mbed_assert_stub.cpp - stubs/mbed_atomic_stub.c - stubs/mbed_critical_stub.c - stubs/equeue_stub.c - ../features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c - stubs/EventQueue_stub.cpp - stubs/mbed_shared_queues_stub.cpp - stubs/nsapi_dns_stub.cpp - stubs/EventFlags_stub.cpp - stubs/stoip4_stub.c - stubs/ip4tos_stub.c - stubs/Kernel_stub.cpp - stubs/SocketStats_Stub.cpp -) - -set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/DTLSSocket/dtls_test_config.h\"") -set_source_files_properties(features/netsocket/DTLSSocket/test_DTLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) -set_source_files_properties(../features/netsocket/DTLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) -set_source_files_properties(../features/netsocket/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) - diff --git a/UNITTESTS/stubs/ATHandler_stub.cpp b/UNITTESTS/stubs/ATHandler_stub.cpp index fde70aaa545..c5b9c7ce673 100644 --- a/UNITTESTS/stubs/ATHandler_stub.cpp +++ b/UNITTESTS/stubs/ATHandler_stub.cpp @@ -16,7 +16,7 @@ */ #include -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" #include "events/EventQueue.h" #include "ATHandler_stub.h" diff --git a/UNITTESTS/stubs/ATHandler_stub.h b/UNITTESTS/stubs/ATHandler_stub.h index 45b112ff42c..538daedd2c9 100644 --- a/UNITTESTS/stubs/ATHandler_stub.h +++ b/UNITTESTS/stubs/ATHandler_stub.h @@ -18,7 +18,7 @@ #include "stdint.h" #include "stdbool.h" #include -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" #include "ATHandler.h" #include "FileHandle_stub.h" #include "Callback.h" diff --git a/UNITTESTS/stubs/AT_CellularInformation_stub.cpp b/UNITTESTS/stubs/AT_CellularInformation_stub.cpp index 8f92d796d4a..6d9d9aef32a 100644 --- a/UNITTESTS/stubs/AT_CellularInformation_stub.cpp +++ b/UNITTESTS/stubs/AT_CellularInformation_stub.cpp @@ -16,7 +16,7 @@ */ #include "AT_CellularInformation.h" -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" using namespace mbed; diff --git a/UNITTESTS/stubs/AT_CellularNetwork_stub.cpp b/UNITTESTS/stubs/AT_CellularNetwork_stub.cpp index 5f043a641c8..df8a55de227 100644 --- a/UNITTESTS/stubs/AT_CellularNetwork_stub.cpp +++ b/UNITTESTS/stubs/AT_CellularNetwork_stub.cpp @@ -20,7 +20,7 @@ #include "CellularUtil.h" #include "CellularLog.h" #include "FileHandle.h" -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" using namespace mbed; using namespace mbed_cellular_util; diff --git a/UNITTESTS/stubs/CellularInterface_stub.cpp b/UNITTESTS/stubs/CellularInterface_stub.cpp index 27a49868eef..154decef7a9 100644 --- a/UNITTESTS/stubs/CellularInterface_stub.cpp +++ b/UNITTESTS/stubs/CellularInterface_stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "CellularInterface.h" +#include "netsocket/CellularInterface.h" MBED_WEAK CellularInterface *CellularInterface::get_target_default_instance() { diff --git a/UNITTESTS/stubs/ControlPlane_netif_stub.h b/UNITTESTS/stubs/ControlPlane_netif_stub.h index a15fd38dc96..be220f47e88 100644 --- a/UNITTESTS/stubs/ControlPlane_netif_stub.h +++ b/UNITTESTS/stubs/ControlPlane_netif_stub.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "ControlPlane_netif.h" +#include "netsocket/ControlPlane_netif.h" #include namespace mbed { diff --git a/UNITTESTS/stubs/EMAC_mock.h b/UNITTESTS/stubs/EMAC_mock.h index f41ae8021f7..2e33bcc0071 100644 --- a/UNITTESTS/stubs/EMAC_mock.h +++ b/UNITTESTS/stubs/EMAC_mock.h @@ -20,7 +20,7 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" -#include "features/netsocket/EMAC.h" +#include "netsocket/EMAC.h" class MockEMAC : public EMAC { public: diff --git a/UNITTESTS/stubs/MeshInterface_stub.cpp b/UNITTESTS/stubs/MeshInterface_stub.cpp index dd504e54f88..f6346ab7d70 100644 --- a/UNITTESTS/stubs/MeshInterface_stub.cpp +++ b/UNITTESTS/stubs/MeshInterface_stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "MeshInterface.h" +#include "netsocket/MeshInterface.h" MBED_WEAK MeshInterface *MeshInterface::get_target_default_instance() { diff --git a/UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp b/UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp index da2ff3f4ce9..dd3a562b2b0 100644 --- a/UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp +++ b/UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp @@ -15,9 +15,9 @@ * limitations under the License. */ #include "netsocket/NetworkInterface.h" -#include "WiFiInterface.h" -#include "CellularInterface.h" -#include "MeshInterface.h" +#include "netsocket/WiFiInterface.h" +#include "netsocket/CellularInterface.h" +#include "netsocket/MeshInterface.h" MBED_WEAK WiFiInterface *WiFiInterface::get_default_instance() { diff --git a/UNITTESTS/stubs/NetworkStack_stub.cpp b/UNITTESTS/stubs/NetworkStack_stub.cpp index 76ad5175a4f..dd68b3e9fb5 100644 --- a/UNITTESTS/stubs/NetworkStack_stub.cpp +++ b/UNITTESTS/stubs/NetworkStack_stub.cpp @@ -15,8 +15,8 @@ * limitations under the License. */ -#include "NetworkStack.h" -#include "nsapi_dns.h" +#include "netsocket/NetworkStack.h" +#include "netsocket/nsapi_dns.h" #include "mbed.h" #include "stddef.h" #include diff --git a/UNITTESTS/stubs/SocketAddress_stub.cpp b/UNITTESTS/stubs/SocketAddress_stub.cpp index 034fe9de992..4d1dd345d60 100644 --- a/UNITTESTS/stubs/SocketAddress_stub.cpp +++ b/UNITTESTS/stubs/SocketAddress_stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "SocketAddress.h" +#include "netsocket/SocketAddress.h" SocketAddress::SocketAddress(const nsapi_addr_t &addr, uint16_t port) diff --git a/UNITTESTS/stubs/SocketStats_Stub.cpp b/UNITTESTS/stubs/SocketStats_Stub.cpp index 7f1c91ecff8..4da960210a3 100644 --- a/UNITTESTS/stubs/SocketStats_Stub.cpp +++ b/UNITTESTS/stubs/SocketStats_Stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "SocketStats.h" +#include "netsocket/SocketStats.h" #if MBED_CONF_NSAPI_SOCKET_STATS_ENABLED int SocketStats::get_entry_position(const Socket *const reference_id) diff --git a/connectivity/cellular/include/cellular/framework/API/ATHandler.h b/connectivity/cellular/include/cellular/framework/API/ATHandler.h index f0d9828412b..5010b9a0e14 100644 --- a/connectivity/cellular/include/cellular/framework/API/ATHandler.h +++ b/connectivity/cellular/include/cellular/framework/API/ATHandler.h @@ -22,7 +22,7 @@ #include "platform/mbed_chrono.h" #include "events/EventQueue.h" -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" #include "Callback.h" #include "rtos/Kernel.h" diff --git a/connectivity/cellular/include/cellular/framework/API/CellularContext.h b/connectivity/cellular/include/cellular/framework/API/CellularContext.h index 1b97820869c..8281b1c25ed 100644 --- a/connectivity/cellular/include/cellular/framework/API/CellularContext.h +++ b/connectivity/cellular/include/cellular/framework/API/CellularContext.h @@ -17,11 +17,11 @@ #ifndef _CELLULARCONTEXT_H_ #define _CELLULARCONTEXT_H_ -#include "NetworkStack.h" -#include "CellularInterface.h" +#include "netsocket/NetworkStack.h" +#include "netsocket/CellularInterface.h" #include "CellularDevice.h" #include "CellularUtil.h" -#include "ControlPlane_netif.h" +#include "netsocket/ControlPlane_netif.h" #include "PinNames.h" /** @file CellularContext.h diff --git a/connectivity/cellular/include/cellular/framework/API/CellularInformation.h b/connectivity/cellular/include/cellular/framework/API/CellularInformation.h index 689e78f6739..e68d96cc58c 100644 --- a/connectivity/cellular/include/cellular/framework/API/CellularInformation.h +++ b/connectivity/cellular/include/cellular/framework/API/CellularInformation.h @@ -19,7 +19,7 @@ #define CELLULAR_INFORMATION_H_ #include -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" const int MAX_IMSI_LENGTH = 15; const int MAX_ICCID_LENGTH = 20 + 1; // +1 for zero termination diff --git a/connectivity/cellular/include/cellular/framework/API/CellularNetwork.h b/connectivity/cellular/include/cellular/framework/API/CellularNetwork.h index c37e9ceb871..a8894c79d09 100644 --- a/connectivity/cellular/include/cellular/framework/API/CellularNetwork.h +++ b/connectivity/cellular/include/cellular/framework/API/CellularNetwork.h @@ -19,7 +19,7 @@ #include "CellularList.h" #include "Callback.h" -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" namespace mbed { diff --git a/connectivity/cellular/include/cellular/framework/API/CellularSMS.h b/connectivity/cellular/include/cellular/framework/API/CellularSMS.h index 7a3004af6aa..0e0be51ede4 100644 --- a/connectivity/cellular/include/cellular/framework/API/CellularSMS.h +++ b/connectivity/cellular/include/cellular/framework/API/CellularSMS.h @@ -21,7 +21,7 @@ #if MBED_CONF_CELLULAR_USE_SMS #include "Callback.h" -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" namespace mbed { diff --git a/connectivity/cellular/include/cellular/framework/AT/AT_CellularStack.h b/connectivity/cellular/include/cellular/framework/AT/AT_CellularStack.h index f0befb7b934..11308f87cda 100644 --- a/connectivity/cellular/include/cellular/framework/AT/AT_CellularStack.h +++ b/connectivity/cellular/include/cellular/framework/AT/AT_CellularStack.h @@ -19,7 +19,7 @@ #define AT_CELLULAR_STACK_H_ #include "ATHandler.h" -#include "NetworkStack.h" +#include "netsocket/NetworkStack.h" #include "PlatformMutex.h" #include "AT_CellularDevice.h" diff --git a/connectivity/cellular/include/cellular/framework/AT/AT_ControlPlane_netif.h b/connectivity/cellular/include/cellular/framework/AT/AT_ControlPlane_netif.h index 6c222c90d29..b9c1effc061 100644 --- a/connectivity/cellular/include/cellular/framework/AT/AT_ControlPlane_netif.h +++ b/connectivity/cellular/include/cellular/framework/AT/AT_ControlPlane_netif.h @@ -16,7 +16,7 @@ */ #include "CellularList.h" -#include "ControlPlane_netif.h" +#include "netsocket/ControlPlane_netif.h" #include "ATHandler.h" #include "AT_CellularDevice.h" diff --git a/connectivity/cellular/include/cellular/framework/common/CellularCommon.h b/connectivity/cellular/include/cellular/framework/common/CellularCommon.h index 10f20478d64..f0466e88cfb 100644 --- a/connectivity/cellular/include/cellular/framework/common/CellularCommon.h +++ b/connectivity/cellular/include/cellular/framework/common/CellularCommon.h @@ -19,7 +19,7 @@ #define CELLULAR_COMMON_ #include -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" const int CELLULAR_RETRY_ARRAY_SIZE = 10; diff --git a/connectivity/cellular/include/cellular/framework/common/CellularUtil.h b/connectivity/cellular/include/cellular/framework/common/CellularUtil.h index ede626be2fb..3ae0aabe665 100644 --- a/connectivity/cellular/include/cellular/framework/common/CellularUtil.h +++ b/connectivity/cellular/include/cellular/framework/common/CellularUtil.h @@ -20,7 +20,7 @@ #include #include -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" namespace mbed_cellular_util { diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/unittest.cmake index f9b709ff268..4c90919afe1 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/unittest.cmake @@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/device - ../features/netsocket/cellular ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake index 28f6b83fcb6..96ce3752e2b 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake @@ -12,7 +12,6 @@ set(unittest-includes ${unittest-includes} ../features/frameworks/mbed-client-randlib/mbed-client-randlib ../drivers ../hal - ../features/netsocket/cellular ) # Source files @@ -60,4 +59,3 @@ set(unittest-test-flags -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 -DMBED_CONF_CELLULAR_USE_SMS=1 ) - diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake index e95d15a5a7c..91917ec709f 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake @@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT ../features/frameworks/mbed-client-randlib/mbed-client-randlib - ../features/netsocket/cellular ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake index f97a15ba3be..7d714b550c0 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake @@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT ../features/frameworks/mbed-client-randlib/mbed-client-randlib - ../features/netsocket/cellular ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake index 5c22bde8752..071c447b4b4 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake @@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT ../features/frameworks/mbed-client-randlib/mbed-client-randlib - ../features/netsocket/cellular ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/at_cellularstacktest.cpp b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/at_cellularstacktest.cpp index 0269fd7e57b..fc0cefc1e10 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/at_cellularstacktest.cpp +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/at_cellularstacktest.cpp @@ -24,7 +24,7 @@ #include "FileHandle_stub.h" #include "CellularLog.h" #include "ATHandler_stub.h" -#include "SocketAddress.h" +#include "netsocket/SocketAddress.h" #include "CellularDevice_stub.h" #include "AT_CellularDevice_stub.h" #include "myCellularDevice.h" diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake index e03da21bc14..7fdfcee9881 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake @@ -9,7 +9,6 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT ../features/frameworks/mbed-client-randlib/mbed-client-randlib - ../features/netsocket/cellular ) # Source files @@ -20,7 +19,7 @@ set(unittest-sources ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c ../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c ../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c - ../features/netsocket/SocketAddress.cpp + ../connectivity/netsocket/source/SocketAddress.cpp ) # Test files @@ -51,4 +50,3 @@ set(unittest-test-flags -DDEVICE_INTERRUPTIN=1 -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 ) - diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/cellularcontext/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/device/cellularcontext/unittest.cmake index f25b44fe08f..8bbb4c4a8ac 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/cellularcontext/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/cellularcontext/unittest.cmake @@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/device/cellulardevice ../connectivity/cellular/include/cellular/framework/device ../connectivity/cellular/include/cellular/framework/common - ../features/netsocket/cellular ) # Source files @@ -19,7 +18,7 @@ set(unittest-sources ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c ../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c ../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c - ../features/netsocket/SocketAddress.cpp + ../connectivity/netsocket/source/SocketAddress.cpp ) # Test files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/cellulardevice/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/device/cellulardevice/unittest.cmake index 3ccb01ca124..b0052a7ec8e 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/cellulardevice/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/cellulardevice/unittest.cmake @@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/device/cellulardevice ../connectivity/cellular/include/cellular/framework/device ../connectivity/cellular/include/cellular/framework/common - ../features/netsocket/cellular ) # Source files @@ -49,4 +48,3 @@ set(unittest-test-flags -DDEVICE_SERIAL=1 -DDEVICE_INTERRUPTIN=1 ) - diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/unittest.cmake index c556ee23672..1d628e13d02 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/unittest.cmake @@ -8,7 +8,6 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/device/cellularstatemachine ../connectivity/cellular/include/cellular/framework/device ../connectivity/cellular/include/cellular/framework/common - ../features/netsocket/cellular ) # Source files diff --git a/connectivity/drivers/wifi/esp8266-driver/ESP8266/ESP8266.cpp b/connectivity/drivers/wifi/esp8266-driver/ESP8266/ESP8266.cpp index 2de83a6b337..56dd02ae997 100644 --- a/connectivity/drivers/wifi/esp8266-driver/ESP8266/ESP8266.cpp +++ b/connectivity/drivers/wifi/esp8266-driver/ESP8266/ESP8266.cpp @@ -25,7 +25,7 @@ #include #include "ESP8266.h" -#include "features/netsocket/nsapi_types.h" +#include "netsocket/nsapi_types.h" #include "mbed_trace.h" #include "PinNames.h" #include "platform/Callback.h" diff --git a/connectivity/drivers/wifi/esp8266-driver/ESP8266/ESP8266.h b/connectivity/drivers/wifi/esp8266-driver/ESP8266/ESP8266.h index 164c877bdef..4b5b1894345 100644 --- a/connectivity/drivers/wifi/esp8266-driver/ESP8266/ESP8266.h +++ b/connectivity/drivers/wifi/esp8266-driver/ESP8266/ESP8266.h @@ -23,8 +23,8 @@ #include #include "drivers/BufferedSerial.h" -#include "features/netsocket/nsapi_types.h" -#include "features/netsocket/WiFiAccessPoint.h" +#include "netsocket/nsapi_types.h" +#include "netsocket/WiFiAccessPoint.h" #include "PinNames.h" #include "platform/ATCmdParser.h" #include "platform/Callback.h" @@ -32,7 +32,7 @@ #include "platform/mbed_error.h" #include "rtos/Mutex.h" #include "rtos/ThisThread.h" -#include "features/netsocket/SocketAddress.h" +#include "netsocket/SocketAddress.h" // Various timeouts for different ESP8266 operations // (some of these can't use literal form as they're needed for defaults in this header, where diff --git a/connectivity/drivers/wifi/esp8266-driver/ESP8266Interface.cpp b/connectivity/drivers/wifi/esp8266-driver/ESP8266Interface.cpp index 90466976761..592817a43dc 100644 --- a/connectivity/drivers/wifi/esp8266-driver/ESP8266Interface.cpp +++ b/connectivity/drivers/wifi/esp8266-driver/ESP8266Interface.cpp @@ -24,7 +24,7 @@ #include "ESP8266Interface.h" #include "events/EventQueue.h" #include "events/mbed_shared_queues.h" -#include "features/netsocket/nsapi_types.h" +#include "netsocket/nsapi_types.h" #include "mbed_trace.h" #include "platform/Callback.h" #include "platform/mbed_atomic.h" diff --git a/connectivity/drivers/wifi/esp8266-driver/ESP8266Interface.h b/connectivity/drivers/wifi/esp8266-driver/ESP8266Interface.h index b3c970be089..e617aceece3 100644 --- a/connectivity/drivers/wifi/esp8266-driver/ESP8266Interface.h +++ b/connectivity/drivers/wifi/esp8266-driver/ESP8266Interface.h @@ -24,12 +24,12 @@ #include "ESP8266/ESP8266.h" #include "events/EventQueue.h" #include "events/mbed_shared_queues.h" -#include "features/netsocket/NetworkInterface.h" -#include "features/netsocket/NetworkStack.h" -#include "features/netsocket/nsapi_types.h" -#include "features/netsocket/SocketAddress.h" -#include "features/netsocket/WiFiAccessPoint.h" -#include "features/netsocket/WiFiInterface.h" +#include "netsocket/NetworkInterface.h" +#include "netsocket/NetworkStack.h" +#include "netsocket/nsapi_types.h" +#include "netsocket/SocketAddress.h" +#include "netsocket/WiFiAccessPoint.h" +#include "netsocket/WiFiInterface.h" #include "platform/Callback.h" #include "platform/mbed_chrono.h" #if MBED_CONF_RTOS_PRESENT diff --git a/features/netsocket/CellularInterface.h b/connectivity/netsocket/include/netsocket/CellularInterface.h similarity index 100% rename from features/netsocket/CellularInterface.h rename to connectivity/netsocket/include/netsocket/CellularInterface.h diff --git a/features/netsocket/CellularNonIPSocket.h b/connectivity/netsocket/include/netsocket/CellularNonIPSocket.h similarity index 100% rename from features/netsocket/CellularNonIPSocket.h rename to connectivity/netsocket/include/netsocket/CellularNonIPSocket.h diff --git a/features/netsocket/ControlPlane_netif.h b/connectivity/netsocket/include/netsocket/ControlPlane_netif.h similarity index 100% rename from features/netsocket/ControlPlane_netif.h rename to connectivity/netsocket/include/netsocket/ControlPlane_netif.h diff --git a/features/netsocket/DNS.h b/connectivity/netsocket/include/netsocket/DNS.h similarity index 100% rename from features/netsocket/DNS.h rename to connectivity/netsocket/include/netsocket/DNS.h diff --git a/features/netsocket/DTLSSocket.h b/connectivity/netsocket/include/netsocket/DTLSSocket.h similarity index 100% rename from features/netsocket/DTLSSocket.h rename to connectivity/netsocket/include/netsocket/DTLSSocket.h diff --git a/features/netsocket/DTLSSocketWrapper.h b/connectivity/netsocket/include/netsocket/DTLSSocketWrapper.h similarity index 100% rename from features/netsocket/DTLSSocketWrapper.h rename to connectivity/netsocket/include/netsocket/DTLSSocketWrapper.h diff --git a/features/netsocket/EMAC.h b/connectivity/netsocket/include/netsocket/EMAC.h similarity index 100% rename from features/netsocket/EMAC.h rename to connectivity/netsocket/include/netsocket/EMAC.h diff --git a/features/netsocket/EMACInterface.h b/connectivity/netsocket/include/netsocket/EMACInterface.h similarity index 100% rename from features/netsocket/EMACInterface.h rename to connectivity/netsocket/include/netsocket/EMACInterface.h diff --git a/features/netsocket/EMACMemoryManager.h b/connectivity/netsocket/include/netsocket/EMACMemoryManager.h similarity index 100% rename from features/netsocket/EMACMemoryManager.h rename to connectivity/netsocket/include/netsocket/EMACMemoryManager.h diff --git a/features/netsocket/EthInterface.h b/connectivity/netsocket/include/netsocket/EthInterface.h similarity index 100% rename from features/netsocket/EthInterface.h rename to connectivity/netsocket/include/netsocket/EthInterface.h diff --git a/features/netsocket/EthernetInterface.h b/connectivity/netsocket/include/netsocket/EthernetInterface.h similarity index 100% rename from features/netsocket/EthernetInterface.h rename to connectivity/netsocket/include/netsocket/EthernetInterface.h diff --git a/features/netsocket/ICMPSocket.h b/connectivity/netsocket/include/netsocket/ICMPSocket.h similarity index 100% rename from features/netsocket/ICMPSocket.h rename to connectivity/netsocket/include/netsocket/ICMPSocket.h diff --git a/features/netsocket/InternetDatagramSocket.h b/connectivity/netsocket/include/netsocket/InternetDatagramSocket.h similarity index 100% rename from features/netsocket/InternetDatagramSocket.h rename to connectivity/netsocket/include/netsocket/InternetDatagramSocket.h diff --git a/features/netsocket/InternetSocket.h b/connectivity/netsocket/include/netsocket/InternetSocket.h similarity index 100% rename from features/netsocket/InternetSocket.h rename to connectivity/netsocket/include/netsocket/InternetSocket.h diff --git a/features/netsocket/L3IP.h b/connectivity/netsocket/include/netsocket/L3IP.h similarity index 100% rename from features/netsocket/L3IP.h rename to connectivity/netsocket/include/netsocket/L3IP.h diff --git a/features/netsocket/L3IPInterface.h b/connectivity/netsocket/include/netsocket/L3IPInterface.h similarity index 100% rename from features/netsocket/L3IPInterface.h rename to connectivity/netsocket/include/netsocket/L3IPInterface.h diff --git a/features/netsocket/MeshInterface.h b/connectivity/netsocket/include/netsocket/MeshInterface.h similarity index 100% rename from features/netsocket/MeshInterface.h rename to connectivity/netsocket/include/netsocket/MeshInterface.h diff --git a/features/netsocket/NetStackMemoryManager.h b/connectivity/netsocket/include/netsocket/NetStackMemoryManager.h similarity index 100% rename from features/netsocket/NetStackMemoryManager.h rename to connectivity/netsocket/include/netsocket/NetStackMemoryManager.h diff --git a/features/netsocket/NetworkInterface.h b/connectivity/netsocket/include/netsocket/NetworkInterface.h similarity index 100% rename from features/netsocket/NetworkInterface.h rename to connectivity/netsocket/include/netsocket/NetworkInterface.h diff --git a/features/netsocket/NetworkStack.h b/connectivity/netsocket/include/netsocket/NetworkStack.h similarity index 100% rename from features/netsocket/NetworkStack.h rename to connectivity/netsocket/include/netsocket/NetworkStack.h diff --git a/features/netsocket/OnboardNetworkStack.h b/connectivity/netsocket/include/netsocket/OnboardNetworkStack.h similarity index 100% rename from features/netsocket/OnboardNetworkStack.h rename to connectivity/netsocket/include/netsocket/OnboardNetworkStack.h diff --git a/features/netsocket/PPP.h b/connectivity/netsocket/include/netsocket/PPP.h similarity index 100% rename from features/netsocket/PPP.h rename to connectivity/netsocket/include/netsocket/PPP.h diff --git a/features/netsocket/PPPInterface.h b/connectivity/netsocket/include/netsocket/PPPInterface.h similarity index 100% rename from features/netsocket/PPPInterface.h rename to connectivity/netsocket/include/netsocket/PPPInterface.h diff --git a/features/netsocket/Socket.h b/connectivity/netsocket/include/netsocket/Socket.h similarity index 100% rename from features/netsocket/Socket.h rename to connectivity/netsocket/include/netsocket/Socket.h diff --git a/features/netsocket/SocketAddress.h b/connectivity/netsocket/include/netsocket/SocketAddress.h similarity index 100% rename from features/netsocket/SocketAddress.h rename to connectivity/netsocket/include/netsocket/SocketAddress.h diff --git a/features/netsocket/SocketStats.h b/connectivity/netsocket/include/netsocket/SocketStats.h similarity index 100% rename from features/netsocket/SocketStats.h rename to connectivity/netsocket/include/netsocket/SocketStats.h diff --git a/features/netsocket/TCPSocket.h b/connectivity/netsocket/include/netsocket/TCPSocket.h similarity index 100% rename from features/netsocket/TCPSocket.h rename to connectivity/netsocket/include/netsocket/TCPSocket.h diff --git a/features/netsocket/TLSSocket.h b/connectivity/netsocket/include/netsocket/TLSSocket.h similarity index 100% rename from features/netsocket/TLSSocket.h rename to connectivity/netsocket/include/netsocket/TLSSocket.h diff --git a/features/netsocket/TLSSocketWrapper.h b/connectivity/netsocket/include/netsocket/TLSSocketWrapper.h similarity index 100% rename from features/netsocket/TLSSocketWrapper.h rename to connectivity/netsocket/include/netsocket/TLSSocketWrapper.h diff --git a/features/netsocket/UDPSocket.h b/connectivity/netsocket/include/netsocket/UDPSocket.h similarity index 100% rename from features/netsocket/UDPSocket.h rename to connectivity/netsocket/include/netsocket/UDPSocket.h diff --git a/features/netsocket/WiFiAccessPoint.h b/connectivity/netsocket/include/netsocket/WiFiAccessPoint.h similarity index 100% rename from features/netsocket/WiFiAccessPoint.h rename to connectivity/netsocket/include/netsocket/WiFiAccessPoint.h diff --git a/features/netsocket/WiFiInterface.h b/connectivity/netsocket/include/netsocket/WiFiInterface.h similarity index 100% rename from features/netsocket/WiFiInterface.h rename to connectivity/netsocket/include/netsocket/WiFiInterface.h diff --git a/features/netsocket/nsapi.h b/connectivity/netsocket/include/netsocket/nsapi.h similarity index 100% rename from features/netsocket/nsapi.h rename to connectivity/netsocket/include/netsocket/nsapi.h diff --git a/features/netsocket/nsapi_dns.h b/connectivity/netsocket/include/netsocket/nsapi_dns.h similarity index 100% rename from features/netsocket/nsapi_dns.h rename to connectivity/netsocket/include/netsocket/nsapi_dns.h diff --git a/features/netsocket/nsapi_ppp.h b/connectivity/netsocket/include/netsocket/nsapi_ppp.h similarity index 100% rename from features/netsocket/nsapi_ppp.h rename to connectivity/netsocket/include/netsocket/nsapi_ppp.h diff --git a/features/netsocket/nsapi_types.h b/connectivity/netsocket/include/netsocket/nsapi_types.h similarity index 100% rename from features/netsocket/nsapi_types.h rename to connectivity/netsocket/include/netsocket/nsapi_types.h diff --git a/features/netsocket/mbed_lib.json b/connectivity/netsocket/mbed_lib.json similarity index 100% rename from features/netsocket/mbed_lib.json rename to connectivity/netsocket/mbed_lib.json diff --git a/features/netsocket/CellularNonIPSocket.cpp b/connectivity/netsocket/source/CellularNonIPSocket.cpp similarity index 99% rename from features/netsocket/CellularNonIPSocket.cpp rename to connectivity/netsocket/source/CellularNonIPSocket.cpp index e1e0265734b..dff7a644330 100644 --- a/features/netsocket/CellularNonIPSocket.cpp +++ b/connectivity/netsocket/source/CellularNonIPSocket.cpp @@ -16,7 +16,7 @@ */ #include "platform/Callback.h" -#include "CellularNonIPSocket.h" +#include "netsocket/CellularNonIPSocket.h" #include using namespace mbed; diff --git a/features/netsocket/DTLSSocket.cpp b/connectivity/netsocket/source/DTLSSocket.cpp similarity index 96% rename from features/netsocket/DTLSSocket.cpp rename to connectivity/netsocket/source/DTLSSocket.cpp index eaf6dc559fc..a4d5af42e4a 100644 --- a/features/netsocket/DTLSSocket.cpp +++ b/connectivity/netsocket/source/DTLSSocket.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "DTLSSocket.h" +#include "netsocket/DTLSSocket.h" #define TRACE_GROUP "TLSS" #include "mbed-trace/mbed_trace.h" diff --git a/features/netsocket/DTLSSocketWrapper.cpp b/connectivity/netsocket/source/DTLSSocketWrapper.cpp similarity index 98% rename from features/netsocket/DTLSSocketWrapper.cpp rename to connectivity/netsocket/source/DTLSSocketWrapper.cpp index 97841cb7349..2f8666def02 100644 --- a/features/netsocket/DTLSSocketWrapper.cpp +++ b/connectivity/netsocket/source/DTLSSocketWrapper.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "DTLSSocketWrapper.h" +#include "netsocket/DTLSSocketWrapper.h" #include "platform/Callback.h" #include "drivers/Timer.h" #include "events/mbed_events.h" diff --git a/features/netsocket/EMACInterface.cpp b/connectivity/netsocket/source/EMACInterface.cpp similarity index 99% rename from features/netsocket/EMACInterface.cpp rename to connectivity/netsocket/source/EMACInterface.cpp index 7e55515d078..215ba863353 100644 --- a/features/netsocket/EMACInterface.cpp +++ b/connectivity/netsocket/source/EMACInterface.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "EMACInterface.h" +#include "netsocket/EMACInterface.h" using namespace mbed; diff --git a/features/netsocket/EthernetInterface.cpp b/connectivity/netsocket/source/EthernetInterface.cpp similarity index 96% rename from features/netsocket/EthernetInterface.cpp rename to connectivity/netsocket/source/EthernetInterface.cpp index 02df3fa138e..92bea2b4132 100644 --- a/features/netsocket/EthernetInterface.cpp +++ b/connectivity/netsocket/source/EthernetInterface.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "EthernetInterface.h" +#include "netsocket/EthernetInterface.h" /* No actual interface implementation here, as EthernetInterface is * just an EMACInterface. But we can be the default EthInterface - step up diff --git a/features/netsocket/ICMPSocket.cpp b/connectivity/netsocket/source/ICMPSocket.cpp similarity index 100% rename from features/netsocket/ICMPSocket.cpp rename to connectivity/netsocket/source/ICMPSocket.cpp diff --git a/features/netsocket/InternetDatagramSocket.cpp b/connectivity/netsocket/source/InternetDatagramSocket.cpp similarity index 98% rename from features/netsocket/InternetDatagramSocket.cpp rename to connectivity/netsocket/source/InternetDatagramSocket.cpp index 3a6685d8607..ae92240e0aa 100644 --- a/features/netsocket/InternetDatagramSocket.cpp +++ b/connectivity/netsocket/source/InternetDatagramSocket.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "InternetDatagramSocket.h" +#include "netsocket/InternetDatagramSocket.h" #include "Timer.h" #include "mbed_assert.h" diff --git a/features/netsocket/InternetSocket.cpp b/connectivity/netsocket/source/InternetSocket.cpp similarity index 99% rename from features/netsocket/InternetSocket.cpp rename to connectivity/netsocket/source/InternetSocket.cpp index 135ab49c4f6..b326dd68e3b 100644 --- a/features/netsocket/InternetSocket.cpp +++ b/connectivity/netsocket/source/InternetSocket.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "InternetSocket.h" +#include "netsocket/InternetSocket.h" #include "platform/mbed_critical.h" #include "platform/Callback.h" diff --git a/features/netsocket/L3IPInterface.cpp b/connectivity/netsocket/source/L3IPInterface.cpp similarity index 100% rename from features/netsocket/L3IPInterface.cpp rename to connectivity/netsocket/source/L3IPInterface.cpp diff --git a/features/netsocket/NetStackMemoryManager.cpp b/connectivity/netsocket/source/NetStackMemoryManager.cpp similarity index 99% rename from features/netsocket/NetStackMemoryManager.cpp rename to connectivity/netsocket/source/NetStackMemoryManager.cpp index 86d643d590d..08470b7d7ea 100644 --- a/features/netsocket/NetStackMemoryManager.cpp +++ b/connectivity/netsocket/source/NetStackMemoryManager.cpp @@ -61,4 +61,3 @@ uint32_t NetStackMemoryManager::copy_from_buf(void *ptr, uint32_t len, const net return copied_len; } - diff --git a/features/netsocket/NetworkInterface.cpp b/connectivity/netsocket/source/NetworkInterface.cpp similarity index 99% rename from features/netsocket/NetworkInterface.cpp rename to connectivity/netsocket/source/NetworkInterface.cpp index 31fc25aa5b7..31ad6c6ef3a 100644 --- a/features/netsocket/NetworkInterface.cpp +++ b/connectivity/netsocket/source/NetworkInterface.cpp @@ -180,4 +180,3 @@ nsapi_error_t NetworkInterface::set_blocking(bool blocking) { return NSAPI_ERROR_UNSUPPORTED; } - diff --git a/features/netsocket/NetworkInterfaceDefaults.cpp b/connectivity/netsocket/source/NetworkInterfaceDefaults.cpp similarity index 97% rename from features/netsocket/NetworkInterfaceDefaults.cpp rename to connectivity/netsocket/source/NetworkInterfaceDefaults.cpp index 01e1625b5d7..fc55770a266 100644 --- a/features/netsocket/NetworkInterfaceDefaults.cpp +++ b/connectivity/netsocket/source/NetworkInterfaceDefaults.cpp @@ -16,10 +16,10 @@ #include "netsocket/NetworkInterface.h" -#include "EthInterface.h" -#include "WiFiInterface.h" -#include "CellularInterface.h" -#include "MeshInterface.h" +#include "netsocket/EthInterface.h" +#include "netsocket/WiFiInterface.h" +#include "netsocket/CellularInterface.h" +#include "netsocket/MeshInterface.h" /* Weak default instance static classes for the various abstract classes. * Applications can override these. diff --git a/features/netsocket/NetworkStack.cpp b/connectivity/netsocket/source/NetworkStack.cpp similarity index 99% rename from features/netsocket/NetworkStack.cpp rename to connectivity/netsocket/source/NetworkStack.cpp index d611fd74af5..f9d0c203be3 100644 --- a/features/netsocket/NetworkStack.cpp +++ b/connectivity/netsocket/source/NetworkStack.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#include "NetworkStack.h" -#include "nsapi_dns.h" +#include "netsocket/NetworkStack.h" +#include "netsocket/nsapi_dns.h" #include "stddef.h" #include #include "events/EventQueue.h" @@ -434,4 +434,3 @@ NetworkStack *nsapi_create_stack(nsapi_stack_t *stack) "The nsapi_stack_t stack buffer must fit a NetworkStackWrapper"); return new (stack->_stack_buffer) NetworkStackWrapper; } - diff --git a/features/netsocket/PPPInterface.cpp b/connectivity/netsocket/source/PPPInterface.cpp similarity index 99% rename from features/netsocket/PPPInterface.cpp rename to connectivity/netsocket/source/PPPInterface.cpp index 3c2705ec75f..fbb37e2bbca 100644 --- a/features/netsocket/PPPInterface.cpp +++ b/connectivity/netsocket/source/PPPInterface.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "PPPInterface.h" +#include "netsocket/PPPInterface.h" using namespace mbed; @@ -166,4 +166,3 @@ nsapi_error_t PPPInterface::set_blocking(bool blocking) _blocking = blocking; return NSAPI_ERROR_OK; } - diff --git a/features/netsocket/SocketAddress.cpp b/connectivity/netsocket/source/SocketAddress.cpp similarity index 97% rename from features/netsocket/SocketAddress.cpp rename to connectivity/netsocket/source/SocketAddress.cpp index 1e72dcb3289..9bef8fc8585 100644 --- a/features/netsocket/SocketAddress.cpp +++ b/connectivity/netsocket/source/SocketAddress.cpp @@ -14,9 +14,9 @@ * limitations under the License. */ -#include "SocketAddress.h" -#include "NetworkInterface.h" -#include "NetworkStack.h" +#include "netsocket/SocketAddress.h" +#include "netsocket/NetworkInterface.h" +#include "netsocket/NetworkStack.h" #include #include #include "ip4string.h" diff --git a/features/netsocket/SocketStats.cpp b/connectivity/netsocket/source/SocketStats.cpp similarity index 99% rename from features/netsocket/SocketStats.cpp rename to connectivity/netsocket/source/SocketStats.cpp index 4de7ebe986f..083513892d4 100644 --- a/features/netsocket/SocketStats.cpp +++ b/connectivity/netsocket/source/SocketStats.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "SocketStats.h" +#include "netsocket/SocketStats.h" #include "platform/mbed_error.h" #include "platform/mbed_assert.h" #ifdef MBED_CONF_RTOS_PRESENT diff --git a/features/netsocket/TCPSocket.cpp b/connectivity/netsocket/source/TCPSocket.cpp similarity index 99% rename from features/netsocket/TCPSocket.cpp rename to connectivity/netsocket/source/TCPSocket.cpp index 457ae571b0e..c6dbe8e295f 100644 --- a/features/netsocket/TCPSocket.cpp +++ b/connectivity/netsocket/source/TCPSocket.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "TCPSocket.h" +#include "netsocket/TCPSocket.h" #include "Timer.h" #include "mbed_assert.h" diff --git a/features/netsocket/TLSSocket.cpp b/connectivity/netsocket/source/TLSSocket.cpp similarity index 98% rename from features/netsocket/TLSSocket.cpp rename to connectivity/netsocket/source/TLSSocket.cpp index 2eb1cc6caed..ab1646dcad1 100644 --- a/features/netsocket/TLSSocket.cpp +++ b/connectivity/netsocket/source/TLSSocket.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "TLSSocket.h" +#include "netsocket/TLSSocket.h" #define TRACE_GROUP "TLSS" #include "mbed-trace/mbed_trace.h" diff --git a/features/netsocket/TLSSocketWrapper.cpp b/connectivity/netsocket/source/TLSSocketWrapper.cpp similarity index 99% rename from features/netsocket/TLSSocketWrapper.cpp rename to connectivity/netsocket/source/TLSSocketWrapper.cpp index 90134da8708..2ff807d2f6c 100644 --- a/features/netsocket/TLSSocketWrapper.cpp +++ b/connectivity/netsocket/source/TLSSocketWrapper.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "TLSSocketWrapper.h" +#include "netsocket/TLSSocketWrapper.h" #include "platform/Callback.h" #include "drivers/Timer.h" #include "events/mbed_events.h" diff --git a/features/netsocket/UDPSocket.cpp b/connectivity/netsocket/source/UDPSocket.cpp similarity index 96% rename from features/netsocket/UDPSocket.cpp rename to connectivity/netsocket/source/UDPSocket.cpp index a21d099cfe0..aec89259c75 100644 --- a/features/netsocket/UDPSocket.cpp +++ b/connectivity/netsocket/source/UDPSocket.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "UDPSocket.h" +#include "netsocket/UDPSocket.h" #include "Timer.h" #include "mbed_assert.h" diff --git a/features/netsocket/WiFiAccessPoint.cpp b/connectivity/netsocket/source/WiFiAccessPoint.cpp similarity index 99% rename from features/netsocket/WiFiAccessPoint.cpp rename to connectivity/netsocket/source/WiFiAccessPoint.cpp index 6cb0dd56a85..24b3626ac6d 100644 --- a/features/netsocket/WiFiAccessPoint.cpp +++ b/connectivity/netsocket/source/WiFiAccessPoint.cpp @@ -31,4 +31,3 @@ uint8_t WiFiAccessPoint::get_channel() const { return _ap.channel; } - diff --git a/features/netsocket/nsapi_dns.cpp b/connectivity/netsocket/source/nsapi_dns.cpp similarity index 99% rename from features/netsocket/nsapi_dns.cpp rename to connectivity/netsocket/source/nsapi_dns.cpp index a2aac6995c4..4b639bcb46d 100644 --- a/features/netsocket/nsapi_dns.cpp +++ b/connectivity/netsocket/source/nsapi_dns.cpp @@ -18,7 +18,7 @@ /* Declare __STDC_LIMIT_MACROS so stdint.h defines INT32_MAX when using C++ */ #define __STDC_LIMIT_MACROS -#include "nsapi_dns.h" +#include "netsocket/nsapi_dns.h" #include "netsocket/UDPSocket.h" #include #include @@ -26,7 +26,7 @@ #include #include "mbed_shared_queues.h" #include "events/EventQueue.h" -#include "OnboardNetworkStack.h" +#include "netsocket/OnboardNetworkStack.h" #include "rtos/Kernel.h" #include "PlatformMutex.h" #include "SingletonPtr.h" diff --git a/features/netsocket/nsapi_ppp.cpp b/connectivity/netsocket/source/nsapi_ppp.cpp similarity index 100% rename from features/netsocket/nsapi_ppp.cpp rename to connectivity/netsocket/source/nsapi_ppp.cpp diff --git a/TESTS/netsocket/README.md b/connectivity/netsocket/tests/TESTS/netsocket/README.md similarity index 99% rename from TESTS/netsocket/README.md rename to connectivity/netsocket/tests/TESTS/netsocket/README.md index 120d818962b..60aed92e4c3 100644 --- a/TESTS/netsocket/README.md +++ b/connectivity/netsocket/tests/TESTS/netsocket/README.md @@ -10,11 +10,11 @@ Target API The target for this plan is to test: -- [Socket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.h). -- [UDPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/UDPSocket.h). -- [TCPSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TCPSocket.h). -- [TLSSocket](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/TLSSocket.h). -- [DNS](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/DNS.h). +- [Socket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/Socket.h). +- [UDPSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/UDPSocket.h). +- [TCPSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/TCPSocket.h). +- [TLSSocket](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/TLSSocket.h). +- [DNS](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/DNS.h). Please see the [Network Socket documentation](https://os.mbed.com/docs/mbed-os/latest/apis/network-socket.html) for reference. @@ -122,7 +122,7 @@ key = /etc/letsencrypt/live//privkey.pem Get, update and install certificate files by certbot (Provided by Let's Encrypt ). - Install lighthttpd server: - + ```.sh $ sudo apt-get install lighttpd $ sudo rm -rf /var/www/html/* @@ -133,7 +133,7 @@ Get, update and install certificate files by certbot (Provided by Let's Encrypt ``` - Install and set up certbot: - + ```.sh $ sudo apt-get update $ sudo apt-get install software-properties-common @@ -143,9 +143,9 @@ Get, update and install certificate files by certbot (Provided by Let's Encrypt $ sudo certbot certonly $ sudo certbot certonly --webroot -w /var/www/html -d ``` - + - Set test server to renew certificate before expiry. - + ```.sh $ sudo echo "SHELL=/bin/sh" > /etc/cron.d/certbot $ sudo echo "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" > /etc/cron.d/certbot @@ -177,7 +177,7 @@ PORT STATE SERVICE Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds -$ sudo nmap -sU -p7,9,13,37,2007,2009,2013 echo.mbedcloudtesting.com +$ sudo nmap -sU -p7,9,13,37,2007,2009,2013 echo.mbedcloudtesting.com Starting Nmap 7.01 ( https://nmap.org ) at 2019-01-08 15:05 CET Nmap scan report for echo.mbedcloudtesting.com (52.215.34.155) @@ -800,7 +800,7 @@ Repeatedly send packets to echo server and read incoming packets back. Verify di **Expected result:** - At least one `sendto()` call of every size returns the packet size. -- Errors returned from `recvfrom()` calls are tolerated. +- Errors returned from `recvfrom()` calls are tolerated. - Calculate packet loss rate. The maximum tolerated packet loss rate is 30%. ### UDPSOCKET_ECHOTEST_NONBLOCK @@ -832,7 +832,7 @@ mode. **Expected result:** - At least one `sendto()` call of every size returns the packet size. -- Errors returned from `recvfrom()` calls are tolerated. +- Errors returned from `recvfrom()` calls are tolerated. - Calculate packet loss rate. The maximum tolerated packet loss rate is 30%. ### UDPSOCKET_ECHOTEST_CONNECT_SEND_RECV @@ -1241,7 +1241,7 @@ Make an HTTP request to a closed socket. ### TLSSOCKET_SEND_UNCONNECTED -**Description:** +**Description:** Make an HTTP request to an unconnected socket. diff --git a/TESTS/netsocket/dns/asynchronous_dns.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_cache.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_cache.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_cache.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_cache.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_cancel.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_multi_ip.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_multi_ip.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_multi_ip.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_multi_ip.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp similarity index 100% rename from TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp diff --git a/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp similarity index 99% rename from TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp index 5c0a901bd9b..128bd3f0b07 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp +++ b/connectivity/netsocket/tests/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp @@ -85,4 +85,3 @@ void ASYNCHRONOUS_DNS_TIMEOUTS() } #endif // defined(MBED_CONF_RTOS_PRESENT) - diff --git a/TESTS/netsocket/dns/dns_tests.h b/connectivity/netsocket/tests/TESTS/netsocket/dns/dns_tests.h similarity index 100% rename from TESTS/netsocket/dns/dns_tests.h rename to connectivity/netsocket/tests/TESTS/netsocket/dns/dns_tests.h diff --git a/TESTS/netsocket/dns/main.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/main.cpp similarity index 100% rename from TESTS/netsocket/dns/main.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/main.cpp diff --git a/TESTS/netsocket/dns/synchronous_dns.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns.cpp similarity index 100% rename from TESTS/netsocket/dns/synchronous_dns.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns.cpp diff --git a/TESTS/netsocket/dns/synchronous_dns_cache.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns_cache.cpp similarity index 100% rename from TESTS/netsocket/dns/synchronous_dns_cache.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns_cache.cpp diff --git a/TESTS/netsocket/dns/synchronous_dns_invalid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns_invalid.cpp similarity index 100% rename from TESTS/netsocket/dns/synchronous_dns_invalid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns_invalid.cpp diff --git a/TESTS/netsocket/dns/synchronous_dns_multi_ip.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns_multi_ip.cpp similarity index 100% rename from TESTS/netsocket/dns/synchronous_dns_multi_ip.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns_multi_ip.cpp diff --git a/TESTS/netsocket/dns/synchronous_dns_multiple.cpp b/connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns_multiple.cpp similarity index 100% rename from TESTS/netsocket/dns/synchronous_dns_multiple.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/dns/synchronous_dns_multiple.cpp diff --git a/TESTS/netsocket/eth_environment.png b/connectivity/netsocket/tests/TESTS/netsocket/eth_environment.png similarity index 100% rename from TESTS/netsocket/eth_environment.png rename to connectivity/netsocket/tests/TESTS/netsocket/eth_environment.png diff --git a/TESTS/netsocket/nidd/main.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/main.cpp similarity index 99% rename from TESTS/netsocket/nidd/main.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/main.cpp index 4feabb60cec..1aafcbddab6 100644 --- a/TESTS/netsocket/nidd/main.cpp +++ b/connectivity/netsocket/tests/TESTS/netsocket/nidd/main.cpp @@ -152,4 +152,3 @@ int main() } #endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) - diff --git a/TESTS/netsocket/nidd/nidd_tests.h b/connectivity/netsocket/tests/TESTS/netsocket/nidd/nidd_tests.h similarity index 100% rename from TESTS/netsocket/nidd/nidd_tests.h rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/nidd_tests.h diff --git a/TESTS/netsocket/nidd/niddsocket_connect.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_connect.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_connect.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_connect.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_disconnect.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_disconnect.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_disconnect.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_disconnect.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_echotest.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_echotest.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_echotest.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_echotest.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_open_close_repeat.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_open_close_repeat.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_open_close_repeat.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_open_close_repeat.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_open_destruct.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_open_destruct.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_open_destruct.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_open_destruct.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_open_limit.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_open_limit.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_open_limit.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_open_limit.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_open_twice.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_open_twice.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_open_twice.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_open_twice.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_recv_timeout.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_recv_timeout.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_recv_timeout.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_recv_timeout.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_send_invalid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_send_invalid.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_send_invalid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_send_invalid.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_send_repeat.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_send_repeat.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_send_repeat.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_send_repeat.cpp diff --git a/TESTS/netsocket/nidd/niddsocket_send_timeout.cpp b/connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_send_timeout.cpp similarity index 100% rename from TESTS/netsocket/nidd/niddsocket_send_timeout.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/nidd/niddsocket_send_timeout.cpp diff --git a/TESTS/netsocket/tcp/main.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/main.cpp similarity index 100% rename from TESTS/netsocket/tcp/main.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/main.cpp diff --git a/TESTS/netsocket/tcp/tcp_tests.h b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcp_tests.h similarity index 100% rename from TESTS/netsocket/tcp/tcp_tests.h rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcp_tests.h diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_bind_address.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_bind_port.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_echotest.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_echotest.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_echotest.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_echotest.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_open_limit.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_open_twice.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp diff --git a/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp similarity index 100% rename from TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp diff --git a/TESTS/netsocket/test_params.h b/connectivity/netsocket/tests/TESTS/netsocket/test_params.h similarity index 100% rename from TESTS/netsocket/test_params.h rename to connectivity/netsocket/tests/TESTS/netsocket/test_params.h diff --git a/TESTS/netsocket/tls/cert.h b/connectivity/netsocket/tests/TESTS/netsocket/tls/cert.h similarity index 99% rename from TESTS/netsocket/tls/cert.h rename to connectivity/netsocket/tests/TESTS/netsocket/tls/cert.h index 3bbaf5ca7e1..caca2adc20c 100644 --- a/TESTS/netsocket/tls/cert.h +++ b/connectivity/netsocket/tests/TESTS/netsocket/tls/cert.h @@ -45,4 +45,3 @@ const char *tls_global::cert = \ "PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6\n" "KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n" "-----END CERTIFICATE-----\n"; - diff --git a/TESTS/netsocket/tls/main.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/main.cpp similarity index 100% rename from TESTS/netsocket/tls/main.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/main.cpp diff --git a/TESTS/netsocket/tls/tls_tests.h b/connectivity/netsocket/tests/TESTS/netsocket/tls/tls_tests.h similarity index 100% rename from TESTS/netsocket/tls/tls_tests.h rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tls_tests.h diff --git a/TESTS/netsocket/tls/tlssocket_connect_invalid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_connect_invalid.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_connect_invalid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_connect_invalid.cpp diff --git a/TESTS/netsocket/tls/tlssocket_echotest.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_echotest.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_echotest.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_echotest.cpp diff --git a/TESTS/netsocket/tls/tlssocket_echotest_burst.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_echotest_burst.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_echotest_burst.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_echotest_burst.cpp diff --git a/TESTS/netsocket/tls/tlssocket_endpoint_close.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_endpoint_close.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_endpoint_close.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_endpoint_close.cpp diff --git a/TESTS/netsocket/tls/tlssocket_handshake_invalid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_handshake_invalid.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_handshake_invalid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_handshake_invalid.cpp diff --git a/TESTS/netsocket/tls/tlssocket_no_cert.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_no_cert.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_no_cert.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_no_cert.cpp diff --git a/TESTS/netsocket/tls/tlssocket_open_destruct.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_open_destruct.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_open_destruct.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_open_destruct.cpp diff --git a/TESTS/netsocket/tls/tlssocket_open_limit.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_open_limit.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_open_limit.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_open_limit.cpp diff --git a/TESTS/netsocket/tls/tlssocket_open_twice.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_open_twice.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_open_twice.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_open_twice.cpp diff --git a/TESTS/netsocket/tls/tlssocket_recv_timeout.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_recv_timeout.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_recv_timeout.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_recv_timeout.cpp diff --git a/TESTS/netsocket/tls/tlssocket_send_closed.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_send_closed.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_send_closed.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_send_closed.cpp diff --git a/TESTS/netsocket/tls/tlssocket_send_repeat.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_send_repeat.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_send_repeat.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_send_repeat.cpp diff --git a/TESTS/netsocket/tls/tlssocket_send_timeout.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_send_timeout.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_send_timeout.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_send_timeout.cpp diff --git a/TESTS/netsocket/tls/tlssocket_send_unconnected.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_send_unconnected.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_send_unconnected.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_send_unconnected.cpp diff --git a/TESTS/netsocket/tls/tlssocket_simultaneous.cpp b/connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_simultaneous.cpp similarity index 100% rename from TESTS/netsocket/tls/tlssocket_simultaneous.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/tls/tlssocket_simultaneous.cpp diff --git a/TESTS/netsocket/udp/main.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/main.cpp similarity index 100% rename from TESTS/netsocket/udp/main.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/main.cpp diff --git a/TESTS/netsocket/udp/udp_tests.h b/connectivity/netsocket/tests/TESTS/netsocket/udp/udp_tests.h similarity index 100% rename from TESTS/netsocket/udp/udp_tests.h rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udp_tests.h diff --git a/TESTS/netsocket/udp/udpsocket_bind_address.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_address.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_bind_address.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_address.cpp diff --git a/TESTS/netsocket/udp/udpsocket_bind_address_invalid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_address_invalid.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_bind_address_invalid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_address_invalid.cpp diff --git a/TESTS/netsocket/udp/udpsocket_bind_address_null.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_address_null.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_bind_address_null.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_address_null.cpp diff --git a/TESTS/netsocket/udp/udpsocket_bind_port.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_port.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_bind_port.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_port.cpp diff --git a/TESTS/netsocket/udp/udpsocket_bind_port_fail.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_port_fail.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_bind_port_fail.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_port_fail.cpp diff --git a/TESTS/netsocket/udp/udpsocket_bind_unopened.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_unopened.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_bind_unopened.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_unopened.cpp diff --git a/TESTS/netsocket/udp/udpsocket_bind_wrong_type.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_wrong_type.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_bind_wrong_type.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_bind_wrong_type.cpp diff --git a/TESTS/netsocket/udp/udpsocket_echotest.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_echotest.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_echotest.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_echotest.cpp diff --git a/TESTS/netsocket/udp/udpsocket_echotest_burst.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_echotest_burst.cpp similarity index 99% rename from TESTS/netsocket/udp/udpsocket_echotest_burst.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_echotest_burst.cpp index 78c1135e2b5..e7532391cd1 100644 --- a/TESTS/netsocket/udp/udpsocket_echotest_burst.cpp +++ b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_echotest_burst.cpp @@ -244,4 +244,3 @@ void UDPSOCKET_ECHOTEST_BURST_NONBLOCK() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } - diff --git a/TESTS/netsocket/udp/udpsocket_open_close_repeat.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_open_close_repeat.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_open_close_repeat.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_open_close_repeat.cpp diff --git a/TESTS/netsocket/udp/udpsocket_open_destruct.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_open_destruct.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_open_destruct.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_open_destruct.cpp diff --git a/TESTS/netsocket/udp/udpsocket_open_limit.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_open_limit.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_open_limit.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_open_limit.cpp diff --git a/TESTS/netsocket/udp/udpsocket_open_twice.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_open_twice.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_open_twice.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_open_twice.cpp diff --git a/TESTS/netsocket/udp/udpsocket_recv_timeout.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_recv_timeout.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_recv_timeout.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_recv_timeout.cpp diff --git a/TESTS/netsocket/udp/udpsocket_sendto_invalid.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_sendto_invalid.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_sendto_invalid.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_sendto_invalid.cpp diff --git a/TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_sendto_repeat.cpp diff --git a/TESTS/netsocket/udp/udpsocket_sendto_timeout.cpp b/connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_sendto_timeout.cpp similarity index 100% rename from TESTS/netsocket/udp/udpsocket_sendto_timeout.cpp rename to connectivity/netsocket/tests/TESTS/netsocket/udp/udpsocket_sendto_timeout.cpp diff --git a/TESTS/netsocket/wifi_environment.png b/connectivity/netsocket/tests/TESTS/netsocket/wifi_environment.png similarity index 100% rename from TESTS/netsocket/wifi_environment.png rename to connectivity/netsocket/tests/TESTS/netsocket/wifi_environment.png diff --git a/TESTS/network/emac/README.md b/connectivity/netsocket/tests/TESTS/network/emac/README.md similarity index 99% rename from TESTS/network/emac/README.md rename to connectivity/netsocket/tests/TESTS/network/emac/README.md index 3bcab0f042d..7aac305a84f 100644 --- a/TESTS/network/emac/README.md +++ b/connectivity/netsocket/tests/TESTS/network/emac/README.md @@ -35,7 +35,7 @@ For Wi-Fi, set the `json` configuration to: } ``` -For Wi-Fi, you also need to configure Wi-Fi SSID and security options to the configuration file. +For Wi-Fi, you also need to configure Wi-Fi SSID and security options to the configuration file. Test case priorities diff --git a/TESTS/network/emac/emac_TestMemoryManager.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_TestMemoryManager.cpp similarity index 100% rename from TESTS/network/emac/emac_TestMemoryManager.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_TestMemoryManager.cpp diff --git a/TESTS/network/emac/emac_TestMemoryManager.h b/connectivity/netsocket/tests/TESTS/network/emac/emac_TestMemoryManager.h similarity index 100% rename from TESTS/network/emac/emac_TestMemoryManager.h rename to connectivity/netsocket/tests/TESTS/network/emac/emac_TestMemoryManager.h diff --git a/TESTS/network/emac/emac_TestNetworkStack.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_TestNetworkStack.cpp similarity index 100% rename from TESTS/network/emac/emac_TestNetworkStack.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_TestNetworkStack.cpp diff --git a/TESTS/network/emac/emac_TestNetworkStack.h b/connectivity/netsocket/tests/TESTS/network/emac/emac_TestNetworkStack.h similarity index 99% rename from TESTS/network/emac/emac_TestNetworkStack.h rename to connectivity/netsocket/tests/TESTS/network/emac/emac_TestNetworkStack.h index 14033136699..3b66dcbde2e 100644 --- a/TESTS/network/emac/emac_TestNetworkStack.h +++ b/connectivity/netsocket/tests/TESTS/network/emac/emac_TestNetworkStack.h @@ -191,7 +191,7 @@ class EmacTestNetworkStack : public OnboardNetworkStack, private mbed::NonCopyab /** Bind a specific address to a socket * - * Binding a socket specifies the address and port on which to recieve + * Binding a socket specifies the address and port on which to receive * data. If the IP address is zeroed, only the port is bound. * * @param handle Socket handle diff --git a/TESTS/network/emac/emac_ctp.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_ctp.cpp similarity index 99% rename from TESTS/network/emac/emac_ctp.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_ctp.cpp index 5e19c3af698..785b08eca2c 100644 --- a/TESTS/network/emac/emac_ctp.cpp +++ b/connectivity/netsocket/tests/TESTS/network/emac/emac_ctp.cpp @@ -150,4 +150,3 @@ void emac_if_ctp_msg_build(int eth_frame_len, const unsigned char *dest_addr, co emac_if_check_memory(false); } #endif // defined(MBED_CONF_RTOS_PRESENT) - diff --git a/TESTS/network/emac/emac_ctp.h b/connectivity/netsocket/tests/TESTS/network/emac/emac_ctp.h similarity index 100% rename from TESTS/network/emac/emac_ctp.h rename to connectivity/netsocket/tests/TESTS/network/emac/emac_ctp.h diff --git a/TESTS/network/emac/emac_initialize.h b/connectivity/netsocket/tests/TESTS/network/emac/emac_initialize.h similarity index 100% rename from TESTS/network/emac/emac_initialize.h rename to connectivity/netsocket/tests/TESTS/network/emac/emac_initialize.h diff --git a/TESTS/network/emac/emac_membuf.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_membuf.cpp similarity index 100% rename from TESTS/network/emac/emac_membuf.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_membuf.cpp diff --git a/TESTS/network/emac/emac_membuf.h b/connectivity/netsocket/tests/TESTS/network/emac/emac_membuf.h similarity index 100% rename from TESTS/network/emac/emac_membuf.h rename to connectivity/netsocket/tests/TESTS/network/emac/emac_membuf.h diff --git a/TESTS/network/emac/emac_test_broadcast.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_test_broadcast.cpp similarity index 100% rename from TESTS/network/emac/emac_test_broadcast.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_test_broadcast.cpp diff --git a/TESTS/network/emac/emac_test_initialize.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_test_initialize.cpp similarity index 100% rename from TESTS/network/emac/emac_test_initialize.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_test_initialize.cpp diff --git a/TESTS/network/emac/emac_test_memory.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_test_memory.cpp similarity index 100% rename from TESTS/network/emac/emac_test_memory.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_test_memory.cpp diff --git a/TESTS/network/emac/emac_test_multicast_filter.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_test_multicast_filter.cpp similarity index 100% rename from TESTS/network/emac/emac_test_multicast_filter.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_test_multicast_filter.cpp diff --git a/TESTS/network/emac/emac_test_unicast.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_test_unicast.cpp similarity index 100% rename from TESTS/network/emac/emac_test_unicast.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_test_unicast.cpp diff --git a/TESTS/network/emac/emac_test_unicast_burst.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_test_unicast_burst.cpp similarity index 100% rename from TESTS/network/emac/emac_test_unicast_burst.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_test_unicast_burst.cpp diff --git a/TESTS/network/emac/emac_test_unicast_frame_len.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_test_unicast_frame_len.cpp similarity index 100% rename from TESTS/network/emac/emac_test_unicast_frame_len.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_test_unicast_frame_len.cpp diff --git a/TESTS/network/emac/emac_test_unicast_long.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_test_unicast_long.cpp similarity index 100% rename from TESTS/network/emac/emac_test_unicast_long.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_test_unicast_long.cpp diff --git a/TESTS/network/emac/emac_tests.h b/connectivity/netsocket/tests/TESTS/network/emac/emac_tests.h similarity index 100% rename from TESTS/network/emac/emac_tests.h rename to connectivity/netsocket/tests/TESTS/network/emac/emac_tests.h diff --git a/TESTS/network/emac/emac_util.cpp b/connectivity/netsocket/tests/TESTS/network/emac/emac_util.cpp similarity index 100% rename from TESTS/network/emac/emac_util.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/emac_util.cpp diff --git a/TESTS/network/emac/emac_util.h b/connectivity/netsocket/tests/TESTS/network/emac/emac_util.h similarity index 100% rename from TESTS/network/emac/emac_util.h rename to connectivity/netsocket/tests/TESTS/network/emac/emac_util.h diff --git a/TESTS/network/emac/main.cpp b/connectivity/netsocket/tests/TESTS/network/emac/main.cpp similarity index 92% rename from TESTS/network/emac/main.cpp rename to connectivity/netsocket/tests/TESTS/network/emac/main.cpp index 6baa8b6fc76..938f91b3f2e 100644 --- a/TESTS/network/emac/main.cpp +++ b/connectivity/netsocket/tests/TESTS/network/emac/main.cpp @@ -77,8 +77,6 @@ int main() return !Harness::run(specification); } -#endif // (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI) && !defined(TARGET_* - -#endif // MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != ETHERNET && MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI +#endif // (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != ETHERNET && MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI) #endif // !defined(MBED_CONF_APP_ECHO_SERVER) || !defined(MBED_CONF_APP_ECHO_SERVER_TRACE) || !defined(MBED_CONF_APP_WIFI_SCAN) #endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/mbed_lib.json b/connectivity/netsocket/tests/TESTS/network/emac/mbed_lib.json similarity index 100% rename from TESTS/network/emac/mbed_lib.json rename to connectivity/netsocket/tests/TESTS/network/emac/mbed_lib.json diff --git a/TESTS/network/emac/template_mbed_app.txt b/connectivity/netsocket/tests/TESTS/network/emac/template_mbed_app.txt similarity index 100% rename from TESTS/network/emac/template_mbed_app.txt rename to connectivity/netsocket/tests/TESTS/network/emac/template_mbed_app.txt diff --git a/TESTS/network/emac/template_mbed_app_echo_server.txt b/connectivity/netsocket/tests/TESTS/network/emac/template_mbed_app_echo_server.txt similarity index 100% rename from TESTS/network/emac/template_mbed_app_echo_server.txt rename to connectivity/netsocket/tests/TESTS/network/emac/template_mbed_app_echo_server.txt diff --git a/TESTS/network/interface/README.md b/connectivity/netsocket/tests/TESTS/network/interface/README.md similarity index 98% rename from TESTS/network/interface/README.md rename to connectivity/netsocket/tests/TESTS/network/interface/README.md index d4496fc36c2..460e7dae519 100644 --- a/TESTS/network/interface/README.md +++ b/connectivity/netsocket/tests/TESTS/network/interface/README.md @@ -4,7 +4,7 @@ Network interface test plan Target API ---------- -The goal of this plan is to test [NetworkInterface.h](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/NetworkInterface.h) +The goal of this plan is to test [NetworkInterface.h](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/NetworkInterface.h) Tools needed ---------------- diff --git a/TESTS/network/interface/main.cpp b/connectivity/netsocket/tests/TESTS/network/interface/main.cpp similarity index 100% rename from TESTS/network/interface/main.cpp rename to connectivity/netsocket/tests/TESTS/network/interface/main.cpp diff --git a/TESTS/network/interface/networkinterface_conn_disc_repeat.cpp b/connectivity/netsocket/tests/TESTS/network/interface/networkinterface_conn_disc_repeat.cpp similarity index 100% rename from TESTS/network/interface/networkinterface_conn_disc_repeat.cpp rename to connectivity/netsocket/tests/TESTS/network/interface/networkinterface_conn_disc_repeat.cpp diff --git a/TESTS/network/interface/networkinterface_status.cpp b/connectivity/netsocket/tests/TESTS/network/interface/networkinterface_status.cpp similarity index 100% rename from TESTS/network/interface/networkinterface_status.cpp rename to connectivity/netsocket/tests/TESTS/network/interface/networkinterface_status.cpp diff --git a/TESTS/network/interface/networkinterface_tests.h b/connectivity/netsocket/tests/TESTS/network/interface/networkinterface_tests.h similarity index 100% rename from TESTS/network/interface/networkinterface_tests.h rename to connectivity/netsocket/tests/TESTS/network/interface/networkinterface_tests.h diff --git a/TESTS/network/l3ip/cellular_driver_l3ip.cpp b/connectivity/netsocket/tests/TESTS/network/l3ip/cellular_driver_l3ip.cpp similarity index 99% rename from TESTS/network/l3ip/cellular_driver_l3ip.cpp rename to connectivity/netsocket/tests/TESTS/network/l3ip/cellular_driver_l3ip.cpp index 317aa442677..b8aa15b081c 100644 --- a/TESTS/network/l3ip/cellular_driver_l3ip.cpp +++ b/connectivity/netsocket/tests/TESTS/network/l3ip/cellular_driver_l3ip.cpp @@ -119,4 +119,3 @@ MBED_WEAK L3IP &L3IP::get_default_instance() */ /* --------------------------------- End Of File ------------------------------ */ - diff --git a/TESTS/network/l3ip/cellular_driver_l3ip.h b/connectivity/netsocket/tests/TESTS/network/l3ip/cellular_driver_l3ip.h similarity index 100% rename from TESTS/network/l3ip/cellular_driver_l3ip.h rename to connectivity/netsocket/tests/TESTS/network/l3ip/cellular_driver_l3ip.h diff --git a/TESTS/network/l3ip/main.cpp b/connectivity/netsocket/tests/TESTS/network/l3ip/main.cpp similarity index 100% rename from TESTS/network/l3ip/main.cpp rename to connectivity/netsocket/tests/TESTS/network/l3ip/main.cpp diff --git a/TESTS/network/multihoming/main.cpp b/connectivity/netsocket/tests/TESTS/network/multihoming/main.cpp similarity index 100% rename from TESTS/network/multihoming/main.cpp rename to connectivity/netsocket/tests/TESTS/network/multihoming/main.cpp diff --git a/TESTS/network/multihoming/multihoming_asynchronous_dns.cpp b/connectivity/netsocket/tests/TESTS/network/multihoming/multihoming_asynchronous_dns.cpp similarity index 100% rename from TESTS/network/multihoming/multihoming_asynchronous_dns.cpp rename to connectivity/netsocket/tests/TESTS/network/multihoming/multihoming_asynchronous_dns.cpp diff --git a/TESTS/network/multihoming/multihoming_synchronous_dns.cpp b/connectivity/netsocket/tests/TESTS/network/multihoming/multihoming_synchronous_dns.cpp similarity index 100% rename from TESTS/network/multihoming/multihoming_synchronous_dns.cpp rename to connectivity/netsocket/tests/TESTS/network/multihoming/multihoming_synchronous_dns.cpp diff --git a/TESTS/network/multihoming/multihoming_tests.h b/connectivity/netsocket/tests/TESTS/network/multihoming/multihoming_tests.h similarity index 100% rename from TESTS/network/multihoming/multihoming_tests.h rename to connectivity/netsocket/tests/TESTS/network/multihoming/multihoming_tests.h diff --git a/TESTS/network/multihoming/multihoming_udpsocket_echotest.cpp b/connectivity/netsocket/tests/TESTS/network/multihoming/multihoming_udpsocket_echotest.cpp similarity index 100% rename from TESTS/network/multihoming/multihoming_udpsocket_echotest.cpp rename to connectivity/netsocket/tests/TESTS/network/multihoming/multihoming_udpsocket_echotest.cpp diff --git a/TESTS/network/wifi/README.md b/connectivity/netsocket/tests/TESTS/network/wifi/README.md similarity index 97% rename from TESTS/network/wifi/README.md rename to connectivity/netsocket/tests/TESTS/network/wifi/README.md index 5f81b8af0f9..9e699229dea 100644 --- a/TESTS/network/wifi/README.md +++ b/connectivity/netsocket/tests/TESTS/network/wifi/README.md @@ -6,7 +6,7 @@ This is a test plan for Mbed OS Wi-Fi API. Target API ---------- -The goal of this plan is to test the [WiFiInterface](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/WiFiInterface.h) class. +The goal of this plan is to test the [WiFiInterface](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/WiFiInterface.h) class. Tools needed ---------------- @@ -215,9 +215,9 @@ For 2.4 Ghz chips: |---------|-----------------------------------------------------------------------------------| | 0 | NSAPI_ERROR_OK (0 = any channel) | | 1 | NSAPI_ERROR_OK | -| 13 | NSAPI_ERROR_OK if supporting European frequencies | +| 13 | NSAPI_ERROR_OK if supporting European frequencies | | | NSAPI_ERROR_PARAMETER if configured for North America | -| 15 | NSAPI_ERROR_PARAMETER | +| 15 | NSAPI_ERROR_PARAMETER | | | because not a valid 2.4 Ghz channel | For 5 Ghz chips: @@ -227,7 +227,7 @@ For 5 Ghz chips: | 3 | NSAPI_ERROR_PARAMETER | | | because not a valid 5 Ghz channel number | | 36 | NSAPI_ERROR_OK | -| 169 | NSAPI_ERROR_PARAMETERs | +| 169 | NSAPI_ERROR_PARAMETERs | | | should not be allowed in any country | Drivers not supporting @@ -375,7 +375,7 @@ Test `WiFiInterface::connect()` without parameters. Use `set_credentials()` for **Description:** -Test `WiFiInterface::connect()` and `WiFiInterface::disconnect()` in non-blocking mode. It checks that driver can connect and disconnect in nonblocking mode. +Test `WiFiInterface::connect()` and `WiFiInterface::disconnect()` in non-blocking mode. It checks that driver can connect and disconnect in nonblocking mode. **Preconditions:** @@ -396,12 +396,12 @@ Test `WiFiInterface::connect()` and `WiFiInterface::disconnect()` in non-blockin **Expected result:** 1. Drivers which do not support asynchronous mode `set_blocking(false)` call returns `NSAPI_ERROR_UNSUPPORTED` and skips test case. -2. `connect()` call returns `NSAPI_ERROR_OK`. -3. `set_credentials(...)` call returns `NSAPI_ERROR_BUSY`. +2. `connect()` call returns `NSAPI_ERROR_OK`. +3. `set_credentials(...)` call returns `NSAPI_ERROR_BUSY`. 4. Second `connect()` call returns `NSAPI_ERROR_BUSY` or `NSAPI_ERROR_IS_CONNECTED`. -5. Attached callback informs about connection status. Callback reports status `NSAPI_STATUS_CONNECTING` and `NSAPI_STATUS_CONNECTED`. -6. `disconnect()` call returns `NSAPI_ERROR_OK`. -7. Second `disconnect()` call returns `NSAPI_ERROR_BUSY` or `NSAPI_ERROR_IS_CONNECTED`. +5. Attached callback informs about connection status. Callback reports status `NSAPI_STATUS_CONNECTING` and `NSAPI_STATUS_CONNECTED`. +6. `disconnect()` call returns `NSAPI_ERROR_OK`. +7. Second `disconnect()` call returns `NSAPI_ERROR_BUSY` or `NSAPI_ERROR_IS_CONNECTED`. 8. To confirm disconnection callback reports `NSAPI_STATUS_DISCONNECTED`. ### WIFI_CONNECT_SECURE diff --git a/TESTS/network/wifi/get_interface.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/get_interface.cpp similarity index 100% rename from TESTS/network/wifi/get_interface.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/get_interface.cpp diff --git a/TESTS/network/wifi/get_security.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/get_security.cpp similarity index 100% rename from TESTS/network/wifi/get_security.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/get_security.cpp diff --git a/TESTS/network/wifi/main.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/main.cpp similarity index 100% rename from TESTS/network/wifi/main.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/main.cpp diff --git a/TESTS/network/wifi/template_mbed_app.txt b/connectivity/netsocket/tests/TESTS/network/wifi/template_mbed_app.txt similarity index 95% rename from TESTS/network/wifi/template_mbed_app.txt rename to connectivity/netsocket/tests/TESTS/network/wifi/template_mbed_app.txt index 052ab466ca2..686a83b30c3 100644 --- a/TESTS/network/wifi/template_mbed_app.txt +++ b/connectivity/netsocket/tests/TESTS/network/wifi/template_mbed_app.txt @@ -39,7 +39,7 @@ }, "target_overrides": { "*": { - "target.network-default-interface-type": "WIFI" + "target.network-default-interface-type": "WIFI" } } } diff --git a/TESTS/network/wifi/wifi-constructor.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi-constructor.cpp similarity index 100% rename from TESTS/network/wifi/wifi-constructor.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi-constructor.cpp diff --git a/TESTS/network/wifi/wifi_connect.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect.cpp diff --git a/TESTS/network/wifi/wifi_connect_disconnect_nonblock.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_disconnect_nonblock.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_disconnect_nonblock.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_disconnect_nonblock.cpp diff --git a/TESTS/network/wifi/wifi_connect_disconnect_repeat.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_disconnect_repeat.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_disconnect_repeat.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_disconnect_repeat.cpp diff --git a/TESTS/network/wifi/wifi_connect_nocredentials.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_nocredentials.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_nocredentials.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_nocredentials.cpp diff --git a/TESTS/network/wifi/wifi_connect_params_channel.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_params_channel.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_params_channel.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_params_channel.cpp diff --git a/TESTS/network/wifi/wifi_connect_params_channel_fail.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_params_channel_fail.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_params_channel_fail.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_params_channel_fail.cpp diff --git a/TESTS/network/wifi/wifi_connect_params_null.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_params_null.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_params_null.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_params_null.cpp diff --git a/TESTS/network/wifi/wifi_connect_params_valid_secure.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_params_valid_secure.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_params_valid_secure.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_params_valid_secure.cpp diff --git a/TESTS/network/wifi/wifi_connect_secure.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_secure.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_secure.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_secure.cpp diff --git a/TESTS/network/wifi/wifi_connect_secure_fail.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_secure_fail.cpp similarity index 100% rename from TESTS/network/wifi/wifi_connect_secure_fail.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_connect_secure_fail.cpp diff --git a/TESTS/network/wifi/wifi_get_rssi.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_get_rssi.cpp similarity index 100% rename from TESTS/network/wifi/wifi_get_rssi.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_get_rssi.cpp diff --git a/TESTS/network/wifi/wifi_scan.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_scan.cpp similarity index 100% rename from TESTS/network/wifi/wifi_scan.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_scan.cpp diff --git a/TESTS/network/wifi/wifi_scan_null.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_scan_null.cpp similarity index 99% rename from TESTS/network/wifi/wifi_scan_null.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_scan_null.cpp index fd5116ac7f2..46751484c59 100644 --- a/TESTS/network/wifi/wifi_scan_null.cpp +++ b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_scan_null.cpp @@ -28,4 +28,3 @@ void wifi_scan_null(void) WiFiInterface *wifi = get_interface(); TEST_ASSERT(wifi->scan(NULL, 0) >= 1); } - diff --git a/TESTS/network/wifi/wifi_set_channel.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_set_channel.cpp similarity index 99% rename from TESTS/network/wifi/wifi_set_channel.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_set_channel.cpp index f9f35f1d002..09eaa23d7f4 100644 --- a/TESTS/network/wifi/wifi_set_channel.cpp +++ b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_set_channel.cpp @@ -71,4 +71,3 @@ void wifi_set_channel(void) wifi->set_channel(0); } - diff --git a/TESTS/network/wifi/wifi_set_credential.cpp b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_set_credential.cpp similarity index 100% rename from TESTS/network/wifi/wifi_set_credential.cpp rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_set_credential.cpp diff --git a/TESTS/network/wifi/wifi_tests.h b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_tests.h similarity index 97% rename from TESTS/network/wifi/wifi_tests.h rename to connectivity/netsocket/tests/TESTS/network/wifi/wifi_tests.h index d2524f4bf9b..37df86c4f2e 100644 --- a/TESTS/network/wifi/wifi_tests.h +++ b/connectivity/netsocket/tests/TESTS/network/wifi/wifi_tests.h @@ -72,7 +72,7 @@ void wifi_connect_secure(void); /** Test WiFiInterface::connect() failing with wrong password. */ void wifi_connect_secure_fail(void); -/** Test WiFiInterface::connect() - disconnect() repeatition works. */ +/** Test WiFiInterface::connect() - disconnect() repetition works. */ void wifi_connect_disconnect_repeat(void); /** Call WiFiInterface::scan() with null parameters to get number of networks available. */ diff --git a/connectivity/netsocket/tests/UNITTESTS/.mbedignore b/connectivity/netsocket/tests/UNITTESTS/.mbedignore new file mode 100644 index 00000000000..72e8ffc0db8 --- /dev/null +++ b/connectivity/netsocket/tests/UNITTESTS/.mbedignore @@ -0,0 +1 @@ +* diff --git a/UNITTESTS/features/netsocket/CellularNonIPSocket/test_CellularNonIPSocket.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/test_CellularNonIPSocket.cpp similarity index 99% rename from UNITTESTS/features/netsocket/CellularNonIPSocket/test_CellularNonIPSocket.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/test_CellularNonIPSocket.cpp index 2cb6e3c6ff5..315db236c13 100644 --- a/UNITTESTS/features/netsocket/CellularNonIPSocket/test_CellularNonIPSocket.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/test_CellularNonIPSocket.cpp @@ -16,7 +16,7 @@ */ #include "gtest/gtest.h" -#include "CellularNonIPSocket.h" +#include "netsocket/CellularNonIPSocket.h" #include "myCellularContext.h" using namespace mbed; diff --git a/UNITTESTS/features/netsocket/CellularNonIPSocket/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/unittest.cmake similarity index 78% rename from UNITTESTS/features/netsocket/CellularNonIPSocket/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/unittest.cmake index 784f3d2ea52..29503eb2ad9 100644 --- a/UNITTESTS/features/netsocket/CellularNonIPSocket/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/unittest.cmake @@ -5,15 +5,14 @@ # Add test specific include paths set(unittest-includes ${unittest-includes} - ../features/netsocket/cellular ) set(unittest-sources - ../features/netsocket/CellularNonIPSocket.cpp + ../connectivity/netsocket/source/CellularNonIPSocket.cpp ) set(unittest-test-sources - features/netsocket/CellularNonIPSocket/test_CellularNonIPSocket.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_CellularNonIPSocket.cpp stubs/NetworkInterface_stub.cpp stubs/NetworkInterfaceDefaults_stub.cpp stubs/NetworkStack_stub.cpp diff --git a/UNITTESTS/features/netsocket/DTLSSocket/dtls_test_config.h b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocket/dtls_test_config.h similarity index 100% rename from UNITTESTS/features/netsocket/DTLSSocket/dtls_test_config.h rename to connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocket/dtls_test_config.h diff --git a/UNITTESTS/features/netsocket/DTLSSocket/test_DTLSSocket.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocket/test_DTLSSocket.cpp similarity index 97% rename from UNITTESTS/features/netsocket/DTLSSocket/test_DTLSSocket.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocket/test_DTLSSocket.cpp index 948301cb3f3..681366fe4d6 100644 --- a/UNITTESTS/features/netsocket/DTLSSocket/test_DTLSSocket.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocket/test_DTLSSocket.cpp @@ -16,7 +16,7 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/DTLSSocket.h" +#include "netsocket/DTLSSocket.h" #include "NetworkStack_stub.h" #include "mbed_error.h" diff --git a/UNITTESTS/features/netsocket/TLSSocket/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocket/unittest.cmake similarity index 50% rename from UNITTESTS/features/netsocket/TLSSocket/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocket/unittest.cmake index bc2a2fff946..12cc718e84d 100644 --- a/UNITTESTS/features/netsocket/TLSSocket/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocket/unittest.cmake @@ -4,12 +4,14 @@ #################### set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/InternetSocket.cpp - ../features/netsocket/TCPSocket.cpp - ../features/netsocket/TLSSocket.cpp - ../features/netsocket/TLSSocketWrapper.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/InternetSocket.cpp + ../connectivity/netsocket/source/InternetDatagramSocket.cpp + ../connectivity/netsocket/source/UDPSocket.cpp + ../connectivity/netsocket/source/DTLSSocket.cpp + ../connectivity/netsocket/source/DTLSSocketWrapper.cpp + ../connectivity/netsocket/source/TLSSocketWrapper.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -18,7 +20,7 @@ set(unittest-sources ) set(unittest-test-sources - features/netsocket/TLSSocket/test_TLSSocket.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_DTLSSocket.cpp stubs/Mutex_stub.cpp stubs/mbed_assert_stub.cpp stubs/mbed_atomic_stub.c @@ -31,11 +33,11 @@ set(unittest-test-sources stubs/EventFlags_stub.cpp stubs/stoip4_stub.c stubs/ip4tos_stub.c + stubs/Kernel_stub.cpp stubs/SocketStats_Stub.cpp ) -set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/TLSSocket/tls_test_config.h\"") -set_source_files_properties(features/netsocket/TLSSocket/test_TLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) -set_source_files_properties(../features/netsocket/TLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) -set_source_files_properties(../features/netsocket/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) - +set(MBEDTLS_USER_CONFIG_FILE_PATH "\"${CMAKE_CURRENT_LIST_DIR}/dtls_test_config.h\"") +set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/test_DTLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) +set_source_files_properties(../connectivity/netsocket/source/DTLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) +set_source_files_properties(../connectivity/netsocket/source/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) diff --git a/UNITTESTS/features/netsocket/DTLSSocketWrapper/dtls_test_config.h b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocketWrapper/dtls_test_config.h similarity index 100% rename from UNITTESTS/features/netsocket/DTLSSocketWrapper/dtls_test_config.h rename to connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocketWrapper/dtls_test_config.h diff --git a/UNITTESTS/features/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp similarity index 99% rename from UNITTESTS/features/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp index da8ee2efcf5..f95fbc9fb4d 100644 --- a/UNITTESTS/features/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp @@ -16,8 +16,8 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/UDPSocket.h" -#include "features/netsocket/DTLSSocketWrapper.h" +#include "netsocket/UDPSocket.h" +#include "netsocket/DTLSSocketWrapper.h" #include "NetworkStack_stub.h" #include "features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.h" #include //memset @@ -407,4 +407,3 @@ TEST_F(TestDTLSSocketWrapper, accept_unsupported) EXPECT_EQ(wrapper->accept(&error), static_cast(NULL)); EXPECT_EQ(error, NSAPI_ERROR_UNSUPPORTED); } - diff --git a/UNITTESTS/features/netsocket/DTLSSocketWrapper/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocketWrapper/unittest.cmake similarity index 51% rename from UNITTESTS/features/netsocket/DTLSSocketWrapper/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocketWrapper/unittest.cmake index 80f91b2822d..2155eb0643e 100644 --- a/UNITTESTS/features/netsocket/DTLSSocketWrapper/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/DTLSSocketWrapper/unittest.cmake @@ -4,13 +4,13 @@ #################### set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/InternetSocket.cpp - ../features/netsocket/InternetDatagramSocket.cpp - ../features/netsocket/UDPSocket.cpp - ../features/netsocket/DTLSSocketWrapper.cpp - ../features/netsocket/TLSSocketWrapper.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/InternetSocket.cpp + ../connectivity/netsocket/source/InternetDatagramSocket.cpp + ../connectivity/netsocket/source/UDPSocket.cpp + ../connectivity/netsocket/source/DTLSSocketWrapper.cpp + ../connectivity/netsocket/source/TLSSocketWrapper.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -19,7 +19,7 @@ set(unittest-sources ) set(unittest-test-sources - features/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_DTLSSocketWrapper.cpp stubs/Mutex_stub.cpp stubs/mbed_assert_stub.cpp stubs/mbed_atomic_stub.c @@ -36,7 +36,6 @@ set(unittest-test-sources stubs/SocketStats_Stub.cpp ) -set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/DTLSSocketWrapper/dtls_test_config.h\"") -set_source_files_properties(features/netsocket/DTLSSocketWrapper/test_DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) -set_source_files_properties(../features/netsocket/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) - +set(MBEDTLS_USER_CONFIG_FILE_PATH "\"${CMAKE_CURRENT_LIST_DIR}/dtls_test_config.h\"") +set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/test_DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) +set_source_files_properties(../connectivity/netsocket/source/DTLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) diff --git a/UNITTESTS/features/netsocket/EthernetInterface/test_EthernetInterface.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/EthernetInterface/test_EthernetInterface.cpp similarity index 98% rename from UNITTESTS/features/netsocket/EthernetInterface/test_EthernetInterface.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/EthernetInterface/test_EthernetInterface.cpp index 0a1a92437b5..29a98878da5 100644 --- a/UNITTESTS/features/netsocket/EthernetInterface/test_EthernetInterface.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/EthernetInterface/test_EthernetInterface.cpp @@ -20,7 +20,7 @@ #include "OnboardNetworkStack_mock.h" -#include "features/netsocket/EthernetInterface.h" +#include "netsocket/EthernetInterface.h" #include #include "EMAC_mock.h" @@ -179,7 +179,7 @@ TEST_F(TestEthernetInterface, set_network) // Testing the getters makes sense now. EXPECT_CALL(*netStackIface, get_mac_address(_, _)) .Times(1) - .WillOnce(DoAll(SetArrayArgument<0>(macAddress, macAddress+NSAPI_MAC_SIZE), Return(macAddress))); + .WillOnce(DoAll(SetArrayArgument<0>(macAddress, macAddress + NSAPI_MAC_SIZE), Return(macAddress))); EXPECT_EQ(std::string(macAddress), std::string(iface->get_mac_address())); EXPECT_CALL(*netStackIface, get_ip_address(_)) diff --git a/UNITTESTS/features/netsocket/EthernetInterface/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/EthernetInterface/unittest.cmake similarity index 75% rename from UNITTESTS/features/netsocket/EthernetInterface/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/EthernetInterface/unittest.cmake index 325d7ea4755..64ca41ea2d3 100644 --- a/UNITTESTS/features/netsocket/EthernetInterface/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/EthernetInterface/unittest.cmake @@ -8,11 +8,11 @@ set(TEST_SUITE_NAME "features_netsocket_EthernetInterface") # Source files set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/EthernetInterface.cpp - ../features/netsocket/EMACInterface.cpp - ../features/netsocket/NetworkInterface.cpp - ../features/netsocket/NetworkStack.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/EthernetInterface.cpp + ../connectivity/netsocket/source/EMACInterface.cpp + ../connectivity/netsocket/source/NetworkInterface.cpp + ../connectivity/netsocket/source/NetworkStack.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -23,7 +23,7 @@ set(unittest-sources # Test files set(unittest-test-sources - features/netsocket/EthernetInterface/test_EthernetInterface.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_EthernetInterface.cpp stubs/Mutex_stub.cpp stubs/mbed_assert_stub.cpp stubs/equeue_stub.c diff --git a/UNITTESTS/moduletests/features/netsocket/IfaceDnsSocket/moduletest.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/IfaceDnsSocket/moduletest.cpp similarity index 99% rename from UNITTESTS/moduletests/features/netsocket/IfaceDnsSocket/moduletest.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/IfaceDnsSocket/moduletest.cpp index 774949f0261..e0c36800388 100644 --- a/UNITTESTS/moduletests/features/netsocket/IfaceDnsSocket/moduletest.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/IfaceDnsSocket/moduletest.cpp @@ -17,9 +17,9 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" -#include "nsapi_dns.h" -#include "features/netsocket/EthernetInterface.h" -#include "SocketAddress.h" +#include "netsocket/nsapi_dns.h" +#include "netsocket/EthernetInterface.h" +#include "netsocket/SocketAddress.h" #include "EMAC_mock.h" #include "OnboardNetworkStack_mock.h" #include "EventQueue.h" @@ -49,7 +49,8 @@ OnboardNetworkStack &OnboardNetworkStack::get_default_instance() } // Wrapper to avoid calling OnboardNetworkStack::get_default_instance() everywhere -static OnboardNetworkStackMock &stackMock() { +static OnboardNetworkStackMock &stackMock() +{ return OnboardNetworkStackMock::get_instance(); } diff --git a/UNITTESTS/moduletests/features/netsocket/IfaceDnsSocket/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/IfaceDnsSocket/unittest.cmake similarity index 68% rename from UNITTESTS/moduletests/features/netsocket/IfaceDnsSocket/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/IfaceDnsSocket/unittest.cmake index e7b77d9304a..d8107e5b3e0 100644 --- a/UNITTESTS/moduletests/features/netsocket/IfaceDnsSocket/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/IfaceDnsSocket/unittest.cmake @@ -4,18 +4,18 @@ #################### set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkInterface.cpp - ../features/netsocket/NetworkInterfaceDefaults.cpp - ../features/netsocket/NetworkStack.cpp #nsapi_create_stack - ../features/netsocket/InternetSocket.cpp - ../features/netsocket/TCPSocket.cpp - ../features/netsocket/InternetDatagramSocket.cpp - ../features/netsocket/UDPSocket.cpp - ../features/netsocket/SocketStats.cpp - ../features/netsocket/EthernetInterface.cpp - ../features/netsocket/EMACInterface.cpp - ../features/netsocket/nsapi_dns.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkInterface.cpp + ../connectivity/netsocket/source/NetworkInterfaceDefaults.cpp + ../connectivity/netsocket/source/NetworkStack.cpp #nsapi_create_stack + ../connectivity/netsocket/source/InternetSocket.cpp + ../connectivity/netsocket/source/TCPSocket.cpp + ../connectivity/netsocket/source/InternetDatagramSocket.cpp + ../connectivity/netsocket/source/UDPSocket.cpp + ../connectivity/netsocket/source/SocketStats.cpp + ../connectivity/netsocket/source/EthernetInterface.cpp + ../connectivity/netsocket/source/EMACInterface.cpp + ../connectivity/netsocket/source/nsapi_dns.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -26,7 +26,7 @@ set(unittest-sources ) set(unittest-test-sources - moduletests/features/netsocket/IfaceDnsSocket/moduletest.cpp + ${CMAKE_CURRENT_LIST_DIR}/moduletest.cpp stubs/MeshInterface_stub.cpp stubs/CellularInterface_stub.cpp stubs/Mutex_stub.cpp diff --git a/UNITTESTS/features/netsocket/InternetSocket/test_InternetSocket.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/InternetSocket/test_InternetSocket.cpp similarity index 99% rename from UNITTESTS/features/netsocket/InternetSocket/test_InternetSocket.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/InternetSocket/test_InternetSocket.cpp index c6840db91d3..9375aa9686a 100644 --- a/UNITTESTS/features/netsocket/InternetSocket/test_InternetSocket.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/InternetSocket/test_InternetSocket.cpp @@ -16,7 +16,7 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/InternetSocket.h" +#include "netsocket/InternetSocket.h" #include "NetworkStack_stub.h" #include #include diff --git a/UNITTESTS/features/netsocket/InternetSocket/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/InternetSocket/unittest.cmake similarity index 81% rename from UNITTESTS/features/netsocket/InternetSocket/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/InternetSocket/unittest.cmake index bd539ecf60b..ff4bba862d2 100644 --- a/UNITTESTS/features/netsocket/InternetSocket/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/InternetSocket/unittest.cmake @@ -6,9 +6,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_NSAPI_DNS_ADDRESSES_LIMIT=10") set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/InternetSocket.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/InternetSocket.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -17,7 +17,7 @@ set(unittest-sources ) set(unittest-test-sources - features/netsocket/InternetSocket/test_InternetSocket.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_InternetSocket.cpp stubs/Mutex_stub.cpp stubs/mbed_assert_stub.cpp stubs/mbed_atomic_stub.c diff --git a/UNITTESTS/features/netsocket/NetworkInterface/test_NetworkInterface.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkInterface/test_NetworkInterface.cpp similarity index 99% rename from UNITTESTS/features/netsocket/NetworkInterface/test_NetworkInterface.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkInterface/test_NetworkInterface.cpp index dc8bd968b1d..6552487e803 100644 --- a/UNITTESTS/features/netsocket/NetworkInterface/test_NetworkInterface.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkInterface/test_NetworkInterface.cpp @@ -16,7 +16,7 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/NetworkInterface.h" +#include "netsocket/NetworkInterface.h" #include "NetworkStack_stub.h" class stubNetworkInterface : public NetworkInterface { diff --git a/UNITTESTS/features/netsocket/NetworkInterface/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkInterface/unittest.cmake similarity index 81% rename from UNITTESTS/features/netsocket/NetworkInterface/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkInterface/unittest.cmake index f1edb8fab85..c03690a4ca9 100644 --- a/UNITTESTS/features/netsocket/NetworkInterface/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkInterface/unittest.cmake @@ -7,9 +7,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_PLATFORM_CALLBACK_COMPARABLE # Source files set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/NetworkInterface.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/NetworkInterface.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -27,7 +27,7 @@ set(unittest-test-sources stubs/mbed_shared_queues_stub.cpp stubs/nsapi_dns_stub.cpp stubs/EventFlags_stub.cpp - features/netsocket/NetworkInterface/test_NetworkInterface.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_NetworkInterface.cpp stubs/NetworkInterfaceDefaults_stub.cpp stubs/SocketStats_Stub.cpp stubs/mbed_error.c diff --git a/UNITTESTS/features/netsocket/NetworkStack/test_NetworkStack.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/test_NetworkStack.cpp similarity index 99% rename from UNITTESTS/features/netsocket/NetworkStack/test_NetworkStack.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/test_NetworkStack.cpp index 23bb4a1ddd2..4995ededf4e 100644 --- a/UNITTESTS/features/netsocket/NetworkStack/test_NetworkStack.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/test_NetworkStack.cpp @@ -16,7 +16,7 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/NetworkStack.h" +#include "netsocket/NetworkStack.h" #include "netsocket/nsapi_dns.h" #include "events/EventQueue.h" #include @@ -240,4 +240,3 @@ TEST_F(TestNetworkStack, setstackopt) { EXPECT_EQ(stack->setstackopt(0, 0, 0, 0), NSAPI_ERROR_UNSUPPORTED); } - diff --git a/UNITTESTS/features/netsocket/NetworkStack/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/unittest.cmake similarity index 80% rename from UNITTESTS/features/netsocket/NetworkStack/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/unittest.cmake index aaf957c533f..239074a27f8 100644 --- a/UNITTESTS/features/netsocket/NetworkStack/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/NetworkStack/unittest.cmake @@ -8,9 +8,9 @@ set(TEST_SUITE_NAME "features_netsocket_NetworkStack") # Source files set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/NetworkInterface.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/NetworkInterface.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -28,6 +28,6 @@ set(unittest-test-sources stubs/mbed_shared_queues_stub.cpp stubs/nsapi_dns_stub.cpp stubs/EventFlags_stub.cpp - features/netsocket/NetworkStack/test_NetworkStack.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_NetworkStack.cpp stubs/SocketStats_Stub.cpp ) diff --git a/UNITTESTS/features/netsocket/PPPInterface/test_PPPInterface.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/PPPInterface/test_PPPInterface.cpp similarity index 99% rename from UNITTESTS/features/netsocket/PPPInterface/test_PPPInterface.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/PPPInterface/test_PPPInterface.cpp index 6db2e76623a..d1dcb99104e 100644 --- a/UNITTESTS/features/netsocket/PPPInterface/test_PPPInterface.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/PPPInterface/test_PPPInterface.cpp @@ -20,7 +20,7 @@ #include "OnboardNetworkStack_mock.h" -#include "features/netsocket/PPPInterface.h" +#include "netsocket/PPPInterface.h" #include #include "FileHandle_stub.h" diff --git a/UNITTESTS/features/netsocket/PPPInterface/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/PPPInterface/unittest.cmake similarity index 76% rename from UNITTESTS/features/netsocket/PPPInterface/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/PPPInterface/unittest.cmake index e94ae149005..8fc42def39b 100644 --- a/UNITTESTS/features/netsocket/PPPInterface/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/PPPInterface/unittest.cmake @@ -8,11 +8,11 @@ set(TEST_SUITE_NAME "features_netsocket_PPPInterface") # Source files set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/PPPInterface.cpp - ../features/netsocket/EMACInterface.cpp - ../features/netsocket/NetworkInterface.cpp - ../features/netsocket/NetworkStack.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/PPPInterface.cpp + ../connectivity/netsocket/source/EMACInterface.cpp + ../connectivity/netsocket/source/NetworkInterface.cpp + ../connectivity/netsocket/source/NetworkStack.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -23,7 +23,7 @@ set(unittest-sources # Test files set(unittest-test-sources - features/netsocket/PPPInterface/test_PPPInterface.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_PPPInterface.cpp stubs/Mutex_stub.cpp stubs/mbed_assert_stub.cpp stubs/equeue_stub.c diff --git a/UNITTESTS/features/netsocket/SocketAddress/test_SocketAddress.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/SocketAddress/test_SocketAddress.cpp similarity index 99% rename from UNITTESTS/features/netsocket/SocketAddress/test_SocketAddress.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/SocketAddress/test_SocketAddress.cpp index cc3588a7e6f..face8890cbc 100644 --- a/UNITTESTS/features/netsocket/SocketAddress/test_SocketAddress.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/SocketAddress/test_SocketAddress.cpp @@ -16,7 +16,7 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/SocketAddress.h" +#include "netsocket/SocketAddress.h" #include class TestSocketAddress: public testing::Test { @@ -167,4 +167,3 @@ TEST_F(TestSocketAddress, bool_operator_ip6_false) SocketAddress addr("0:0:0:0:0:0:0:0", 80); EXPECT_FALSE(addr ? true : false); } - diff --git a/UNITTESTS/features/netsocket/SocketAddress/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/SocketAddress/unittest.cmake similarity index 85% rename from UNITTESTS/features/netsocket/SocketAddress/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/SocketAddress/unittest.cmake index cc502046457..6cb641bc2d7 100644 --- a/UNITTESTS/features/netsocket/SocketAddress/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/SocketAddress/unittest.cmake @@ -8,7 +8,7 @@ set(TEST_SUITE_NAME "features_netsocket_SocketAddress") # Source files set(unittest-sources - ../features/netsocket/SocketAddress.cpp + ../connectivity/netsocket/source/SocketAddress.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -18,5 +18,5 @@ set(unittest-sources # Test files set(unittest-test-sources - features/netsocket/SocketAddress/test_SocketAddress.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_SocketAddress.cpp ) diff --git a/UNITTESTS/features/netsocket/TCPSocket/test_TCPSocket.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/TCPSocket/test_TCPSocket.cpp similarity index 99% rename from UNITTESTS/features/netsocket/TCPSocket/test_TCPSocket.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/TCPSocket/test_TCPSocket.cpp index f05d930b6b9..4042b79e145 100644 --- a/UNITTESTS/features/netsocket/TCPSocket/test_TCPSocket.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/TCPSocket/test_TCPSocket.cpp @@ -16,7 +16,7 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/TCPSocket.h" +#include "netsocket/TCPSocket.h" #include "NetworkStack_stub.h" // Control the rtos EventFlags stub. See EventFlags_stub.cpp diff --git a/UNITTESTS/features/netsocket/TCPSocket/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/TCPSocket/unittest.cmake similarity index 76% rename from UNITTESTS/features/netsocket/TCPSocket/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/TCPSocket/unittest.cmake index fae8d912c02..1966b7c4078 100644 --- a/UNITTESTS/features/netsocket/TCPSocket/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/TCPSocket/unittest.cmake @@ -4,10 +4,10 @@ #################### set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/InternetSocket.cpp - ../features/netsocket/TCPSocket.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/InternetSocket.cpp + ../connectivity/netsocket/source/TCPSocket.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -16,7 +16,7 @@ set(unittest-sources ) set(unittest-test-sources - features/netsocket/TCPSocket/test_TCPSocket.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_TCPSocket.cpp stubs/Mutex_stub.cpp stubs/mbed_assert_stub.cpp stubs/mbed_atomic_stub.c diff --git a/UNITTESTS/features/netsocket/TLSSocket/test_TLSSocket.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocket/test_TLSSocket.cpp similarity index 97% rename from UNITTESTS/features/netsocket/TLSSocket/test_TLSSocket.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocket/test_TLSSocket.cpp index 585ef2ac77d..67d7dc272ed 100644 --- a/UNITTESTS/features/netsocket/TLSSocket/test_TLSSocket.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocket/test_TLSSocket.cpp @@ -16,7 +16,7 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/TLSSocket.h" +#include "netsocket/TLSSocket.h" #include "NetworkStack_stub.h" #include "mbed_error.h" diff --git a/UNITTESTS/features/netsocket/TLSSocket/tls_test_config.h b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocket/tls_test_config.h similarity index 100% rename from UNITTESTS/features/netsocket/TLSSocket/tls_test_config.h rename to connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocket/tls_test_config.h diff --git a/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocket/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocket/unittest.cmake new file mode 100644 index 00000000000..be7871e6eaf --- /dev/null +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocket/unittest.cmake @@ -0,0 +1,41 @@ + +#################### +# UNIT TESTS +#################### + +set(unittest-sources + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/InternetSocket.cpp + ../connectivity/netsocket/source/TCPSocket.cpp + ../connectivity/netsocket/source/TLSSocket.cpp + ../connectivity/netsocket/source/TLSSocketWrapper.cpp + ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c + ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c + ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c + ../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c + ../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c +) + +set(unittest-test-sources + ${CMAKE_CURRENT_LIST_DIR}/test_TLSSocket.cpp + stubs/Mutex_stub.cpp + stubs/mbed_assert_stub.cpp + stubs/mbed_atomic_stub.c + stubs/mbed_critical_stub.c + stubs/equeue_stub.c + ../features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c + stubs/EventQueue_stub.cpp + stubs/mbed_shared_queues_stub.cpp + stubs/nsapi_dns_stub.cpp + stubs/EventFlags_stub.cpp + stubs/stoip4_stub.c + stubs/ip4tos_stub.c + stubs/SocketStats_Stub.cpp +) + +set(MBEDTLS_USER_CONFIG_FILE_PATH "\"${CMAKE_CURRENT_LIST_DIR}/tls_test_config.h\"") +#set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/tls_test_config.h\"") +set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/test_TLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) +set_source_files_properties(../connectivity/netsocket/source/TLSSocket.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) +set_source_files_properties(../connectivity/netsocket/source/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) diff --git a/UNITTESTS/features/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp similarity index 99% rename from UNITTESTS/features/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp index 0f20e6ea299..57f18380776 100644 --- a/UNITTESTS/features/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp @@ -16,8 +16,8 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/TCPSocket.h" -#include "features/netsocket/TLSSocketWrapper.h" +#include "netsocket/TCPSocket.h" +#include "netsocket/TLSSocketWrapper.h" #include "NetworkStack_stub.h" #include "features/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.h" #include //memset @@ -477,4 +477,3 @@ TEST_F(TestTLSSocketWrapper, accept_unsupported) EXPECT_EQ(wrapper->accept(&error), static_cast(NULL)); EXPECT_EQ(error, NSAPI_ERROR_UNSUPPORTED); } - diff --git a/UNITTESTS/features/netsocket/TLSSocketWrapper/tls_test_config.h b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/tls_test_config.h similarity index 100% rename from UNITTESTS/features/netsocket/TLSSocketWrapper/tls_test_config.h rename to connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/tls_test_config.h diff --git a/UNITTESTS/features/netsocket/TLSSocketWrapper/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/unittest.cmake similarity index 53% rename from UNITTESTS/features/netsocket/TLSSocketWrapper/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/unittest.cmake index 9510c9141e5..0700b2290ca 100644 --- a/UNITTESTS/features/netsocket/TLSSocketWrapper/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/TLSSocketWrapper/unittest.cmake @@ -4,11 +4,11 @@ #################### set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/InternetSocket.cpp - ../features/netsocket/TCPSocket.cpp - ../features/netsocket/TLSSocketWrapper.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/InternetSocket.cpp + ../connectivity/netsocket/source/TCPSocket.cpp + ../connectivity/netsocket/source/TLSSocketWrapper.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -17,7 +17,7 @@ set(unittest-sources ) set(unittest-test-sources - features/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_TLSSocketWrapper.cpp stubs/Mutex_stub.cpp stubs/mbed_assert_stub.cpp stubs/mbed_atomic_stub.c @@ -31,7 +31,6 @@ set(unittest-test-sources stubs/SocketStats_Stub.cpp ) -set(MBEDTLS_USER_CONFIG_FILE_PATH "\"../UNITTESTS/features/netsocket/TLSSocketWrapper/tls_test_config.h\"") -set_source_files_properties(features/netsocket/TLSSocketWrapper/test_TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) -set_source_files_properties(../features/netsocket/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) - +set(MBEDTLS_USER_CONFIG_FILE_PATH "\"${CMAKE_CURRENT_LIST_DIR}/tls_test_config.h\"") +set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/test_TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) +set_source_files_properties(../connectivity/netsocket/source/TLSSocketWrapper.cpp PROPERTIES COMPILE_DEFINITIONS MBEDTLS_USER_CONFIG_FILE=${MBEDTLS_USER_CONFIG_FILE_PATH}) diff --git a/UNITTESTS/features/netsocket/UDPSocket/test_UDPSocket.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/UDPSocket/test_UDPSocket.cpp similarity index 98% rename from UNITTESTS/features/netsocket/UDPSocket/test_UDPSocket.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/UDPSocket/test_UDPSocket.cpp index d508955a14e..c847d42f063 100644 --- a/UNITTESTS/features/netsocket/UDPSocket/test_UDPSocket.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/UDPSocket/test_UDPSocket.cpp @@ -16,8 +16,8 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/UDPSocket.h" -#include "features/netsocket/nsapi_dns.h" +#include "netsocket/UDPSocket.h" +#include "netsocket/nsapi_dns.h" #include "NetworkStack_stub.h" /** diff --git a/UNITTESTS/features/netsocket/UDPSocket/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/UDPSocket/unittest.cmake similarity index 72% rename from UNITTESTS/features/netsocket/UDPSocket/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/UDPSocket/unittest.cmake index abd933e2df3..bf9b060330f 100644 --- a/UNITTESTS/features/netsocket/UDPSocket/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/UDPSocket/unittest.cmake @@ -4,11 +4,11 @@ #################### set(unittest-sources - ../features/netsocket/SocketAddress.cpp - ../features/netsocket/NetworkStack.cpp - ../features/netsocket/InternetSocket.cpp - ../features/netsocket/InternetDatagramSocket.cpp - ../features/netsocket/UDPSocket.cpp + ../connectivity/netsocket/source/SocketAddress.cpp + ../connectivity/netsocket/source/NetworkStack.cpp + ../connectivity/netsocket/source/InternetSocket.cpp + ../connectivity/netsocket/source/InternetDatagramSocket.cpp + ../connectivity/netsocket/source/UDPSocket.cpp ../connectivity/libraries/nanostack-libservice/source/libip4string/ip4tos.c ../connectivity/libraries/nanostack-libservice/source/libip6string/ip6tos.c ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c @@ -17,7 +17,7 @@ set(unittest-sources ) set(unittest-test-sources - features/netsocket/UDPSocket/test_UDPSocket.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_UDPSocket.cpp stubs/Mutex_stub.cpp stubs/mbed_assert_stub.cpp stubs/mbed_atomic_stub.c diff --git a/UNITTESTS/features/netsocket/WiFiAccessPoint/test_WiFiAccessPoint.cpp b/connectivity/netsocket/tests/UNITTESTS/netsocket/WiFiAccessPoint/test_WiFiAccessPoint.cpp similarity index 95% rename from UNITTESTS/features/netsocket/WiFiAccessPoint/test_WiFiAccessPoint.cpp rename to connectivity/netsocket/tests/UNITTESTS/netsocket/WiFiAccessPoint/test_WiFiAccessPoint.cpp index b20ae837760..f9f64a80d16 100644 --- a/UNITTESTS/features/netsocket/WiFiAccessPoint/test_WiFiAccessPoint.cpp +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/WiFiAccessPoint/test_WiFiAccessPoint.cpp @@ -16,8 +16,8 @@ */ #include "gtest/gtest.h" -#include "features/netsocket/WiFiAccessPoint.h" -#include "features/netsocket/NetworkInterface.h" +#include "netsocket/WiFiAccessPoint.h" +#include "netsocket/NetworkInterface.h" #include class TestWiFiAccessPoint : public testing::Test { @@ -65,4 +65,3 @@ TEST_F(TestWiFiAccessPoint, set_data) EXPECT_EQ(testAp.security, ap1->get_security()); delete ap1; } - diff --git a/UNITTESTS/features/netsocket/WiFiAccessPoint/unittest.cmake b/connectivity/netsocket/tests/UNITTESTS/netsocket/WiFiAccessPoint/unittest.cmake similarity index 50% rename from UNITTESTS/features/netsocket/WiFiAccessPoint/unittest.cmake rename to connectivity/netsocket/tests/UNITTESTS/netsocket/WiFiAccessPoint/unittest.cmake index 4b045712c4c..a4ffba1d4e7 100644 --- a/UNITTESTS/features/netsocket/WiFiAccessPoint/unittest.cmake +++ b/connectivity/netsocket/tests/UNITTESTS/netsocket/WiFiAccessPoint/unittest.cmake @@ -4,9 +4,9 @@ #################### set(unittest-sources - ../features/netsocket/WiFiAccessPoint.cpp + ../connectivity/netsocket/source/WiFiAccessPoint.cpp ) set(unittest-test-sources - features/netsocket/WiFiAccessPoint/test_WiFiAccessPoint.cpp + ${CMAKE_CURRENT_LIST_DIR}/test_WiFiAccessPoint.cpp ) diff --git a/docs/design-documents/features/connectivity/TLSSocket - Design document.md b/docs/design-documents/features/connectivity/TLSSocket - Design document.md index f12a802ca46..666569c6b5a 100644 --- a/docs/design-documents/features/connectivity/TLSSocket - Design document.md +++ b/docs/design-documents/features/connectivity/TLSSocket - Design document.md @@ -133,7 +133,7 @@ Also, configuration structures can be shared between sockets, which leads to RAM ## Detailed design for abstract socket API -The Mbed OS [Socket interface](https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/Socket.h) is an abstract C++ inteface that follows the POSIX socket API. +The Mbed OS [Socket interface](https://github.com/ARMmbed/mbed-os/blob/master/connectivity/netsocket/Socket.h) is an abstract C++ inteface that follows the POSIX socket API. ### Receiving and sending data from Mbed TLS diff --git a/tools/test/travis-ci/doxy-spellchecker/ignore.en.pws b/tools/test/travis-ci/doxy-spellchecker/ignore.en.pws index 29f2d083610..629a137cf09 100644 --- a/tools/test/travis-ci/doxy-spellchecker/ignore.en.pws +++ b/tools/test/travis-ci/doxy-spellchecker/ignore.en.pws @@ -116,4 +116,5 @@ chrono Hinnant Vin Vref +ssid _doxy_