Skip to content

Commit

Permalink
Merge pull request #14896 from ARMmbed/move_connectivity_nanostack_li…
Browse files Browse the repository at this point in the history
…bservice_stub

Move connectivity nanostack libservice stub
  • Loading branch information
0xc0170 authored Jul 13, 2021
2 parents f37b0c4 + d488597 commit 9a59145
Show file tree
Hide file tree
Showing 24 changed files with 48 additions and 37 deletions.
5 changes: 0 additions & 5 deletions UNITTESTS/stubs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ target_include_directories(mbed-headers-base

target_include_directories(mbed-headers-connectivity
INTERFACE
${mbed-os_SOURCE_DIR}/connectivity/libraries/nanostack-libservice
${mbed-os_SOURCE_DIR}/connectivity/libraries/nanostack-libservice/mbed-client-libservice
${mbed-os_SOURCE_DIR}/connectivity
${mbed-os_SOURCE_DIR}/connectivity/FEATURE_BLE/include
${mbed-os_SOURCE_DIR}/connectivity/FEATURE_BLE/include/ble
Expand All @@ -48,13 +46,10 @@ target_include_directories(mbed-stubs-headers
.
)

add_subdirectory(connectivity)

add_library(mbed-stubs INTERFACE)

target_link_libraries(mbed-stubs
INTERFACE
mbed-stubs-connectivity
mbed-stubs-drivers
mbed-stubs-events
mbed-stubs-hal
Expand Down
32 changes: 0 additions & 32 deletions UNITTESTS/stubs/connectivity/CMakeLists.txt

This file was deleted.

1 change: 1 addition & 0 deletions connectivity/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ else()
add_subdirectory(lorawan)
add_subdirectory(netsocket)
add_subdirectory(mbedtls)
add_subdirectory(libraries)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-netsocket
mbed-headers-cellular
mbed-stubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-netsocket
mbed-headers-cellular
mbed-stubs
Expand Down
4 changes: 4 additions & 0 deletions connectivity/libraries/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
add_subdirectory(tests/UNITTESTS)
endif()

add_subdirectory(mbed-coap)
add_subdirectory(nanostack-libservice)
add_subdirectory(ppp)
1 change: 1 addition & 0 deletions connectivity/libraries/tests/UNITTESTS/.mbedignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
4 changes: 4 additions & 0 deletions connectivity/libraries/tests/UNITTESTS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(doubles)
23 changes: 23 additions & 0 deletions connectivity/libraries/tests/UNITTESTS/doubles/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_library(mbed-headers-nanostack-libservice INTERFACE)

target_include_directories(mbed-headers-nanostack-libservice
INTERFACE
${mbed-os_SOURCE_DIR}/connectivity/libraries/nanostack-libservice
${mbed-os_SOURCE_DIR}/connectivity/libraries/nanostack-libservice/mbed-client-libservice
)
add_library(mbed-stubs-nanostack-libservice)

target_sources(mbed-stubs-nanostack-libservice
PRIVATE
ip4tos_stub.c
stoip4_stub.c
)

target_link_libraries(mbed-stubs-nanostack-libservice
PRIVATE
mbed-headers-nanostack-libservice
gtest
)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-mbedtls
mbed-headers-netsocket
mbed-stubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-mbedtls
mbed-headers-netsocket
mbed-stubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ target_sources(${TEST_NAME}

target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers-nanostack-libservice
mbed-headers-mbedtls
mbed-headers-netsocket
mbed-headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-mbedtls
mbed-headers-netsocket
mbed-stubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-netsocket
mbed-stubs
mbed-stubs-headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-netsocket
mbed-stubs
mbed-stubs-headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-netsocket
mbed-stubs
mbed-stubs-headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-mbedtls
mbed-headers-netsocket
mbed-stubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-netsocket
mbed-stubs
mbed-stubs-headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-netsocket
mbed-stubs
mbed-stubs-headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-mbedtls
mbed-headers-netsocket
mbed-stubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-mbedtls
mbed-headers-netsocket
mbed-stubs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ target_sources(${TEST_NAME}
target_link_libraries(${TEST_NAME}
PRIVATE
mbed-headers
mbed-headers-nanostack-libservice
mbed-headers-netsocket
mbed-stubs
mbed-stubs-headers
Expand Down

0 comments on commit 9a59145

Please sign in to comment.