mirror of https://github.com/ARMmbed/mbed-os.git
CMake: Move netsocket stubs to the netsocket dir
Move the connectivity netsocket stubs into the connectivity/netsocket component directory. So we can avoid duplicating the mbed-os source tree in a central UNITTESTS folder.pull/14873/head
parent
69d1db9730
commit
5433365b81
|
@ -40,7 +40,7 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual nsapi_error_t get_ip_address(SocketAddress* address)
|
virtual nsapi_error_t get_ip_address(SocketAddress *address)
|
||||||
{
|
{
|
||||||
address->set_ip_address("127.0.0.1");
|
address->set_ip_address("127.0.0.1");
|
||||||
return NSAPI_ERROR_OK;
|
return NSAPI_ERROR_OK;
|
||||||
|
|
|
@ -19,17 +19,9 @@ target_compile_definitions(mbed-stubs-connectivity
|
||||||
target_sources(mbed-stubs-connectivity
|
target_sources(mbed-stubs-connectivity
|
||||||
PRIVATE
|
PRIVATE
|
||||||
aes_stub.c
|
aes_stub.c
|
||||||
CellularInterface_stub.cpp
|
|
||||||
cipher_stub.c
|
cipher_stub.c
|
||||||
cmac_stub.c
|
cmac_stub.c
|
||||||
ip4tos_stub.c
|
ip4tos_stub.c
|
||||||
MeshInterface_stub.cpp
|
|
||||||
NetworkInterfaceDefaults_stub.cpp
|
|
||||||
NetworkInterface_stub.cpp
|
|
||||||
NetworkStack_stub.cpp
|
|
||||||
nsapi_dns_stub.cpp
|
|
||||||
SocketAddress_stub.cpp
|
|
||||||
SocketStats_Stub.cpp
|
|
||||||
stoip4_stub.c
|
stoip4_stub.c
|
||||||
${mbed-os_SOURCE_DIR}/connectivity/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c
|
${mbed-os_SOURCE_DIR}/connectivity/nanostack/coap-service/test/coap-service/unittest/stub/mbedtls_stub.c
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
add_subdirectory(doubles)
|
||||||
add_subdirectory(netsocket)
|
add_subdirectory(netsocket)
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
add_library(mbed-stubs-netsocket)
|
||||||
|
|
||||||
|
target_sources(mbed-stubs-netsocket
|
||||||
|
PRIVATE
|
||||||
|
CellularInterface_stub.cpp
|
||||||
|
MeshInterface_stub.cpp
|
||||||
|
NetworkInterfaceDefaults_stub.cpp
|
||||||
|
NetworkInterface_stub.cpp
|
||||||
|
NetworkStack_stub.cpp
|
||||||
|
nsapi_dns_stub.cpp
|
||||||
|
SocketAddress_stub.cpp
|
||||||
|
SocketStats_Stub.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(mbed-stubs-netsocket
|
||||||
|
PRIVATE
|
||||||
|
mbed-stubs-rtos-headers
|
||||||
|
mbed-headers
|
||||||
|
mbed-stubs-headers
|
||||||
|
mbed-stubs-rtos
|
||||||
|
gtest
|
||||||
|
)
|
|
@ -94,7 +94,7 @@ nsapi_error_t NetworkStack::call_in(int delay, mbed::Callback<void()> func)
|
||||||
return NSAPI_ERROR_UNSUPPORTED;
|
return NSAPI_ERROR_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsapi_error_t NetworkStack::get_ip_address(SocketAddress* address)
|
nsapi_error_t NetworkStack::get_ip_address(SocketAddress *address)
|
||||||
{
|
{
|
||||||
return NSAPI_ERROR_UNSUPPORTED;
|
return NSAPI_ERROR_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ nsapi_error_t NetworkStack::get_ipv6_link_local_address(SocketAddress *address)
|
||||||
return NSAPI_ERROR_UNSUPPORTED;
|
return NSAPI_ERROR_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsapi_error_t NetworkStack::get_ip_address_if(SocketAddress* address, const char *interface_name)
|
nsapi_error_t NetworkStack::get_ip_address_if(SocketAddress *address, const char *interface_name)
|
||||||
{
|
{
|
||||||
return NSAPI_ERROR_UNSUPPORTED;
|
return NSAPI_ERROR_UNSUPPORTED;
|
||||||
}
|
}
|
Loading…
Reference in New Issue