Skip to content

Commit

Permalink
Fix baremetal build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Jan 22, 2025
1 parent 8f9ee15 commit 87c6694
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/greentea_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
# Note: We have to set a wifi network name and password so that the test will compile on devices that use wifi
run: |
rm -rf __build
cmake -S . -B __build -GNinja -DUPLOAD_METHOD=NONE -DMBED_GREENTEA_WIFI_SECURE_SSID=SomeNetwork -DMBED_GREENTEA_WIFI_SECURE_PASSWORD=SomePassword -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_TEST_BAREMETAL=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=${{ matrix.target }} -DMBED_APP_JSON_PATH=TESTS/configs/greentea_baremetal.json5
cmake -S . -B __build -GNinja -DUPLOAD_METHOD=NONE -DMBED_GREENTEA_WIFI_SECURE_SSID=SomeNetwork -DMBED_GREENTEA_WIFI_SECURE_PASSWORD=SomePassword -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=${{ matrix.target }} -DMBED_APP_JSON_PATH=TESTS/configs/greentea_baremetal.json5
cmake --build __build
- name: Build ${{ matrix.target }} with full profile
Expand Down
4 changes: 2 additions & 2 deletions connectivity/netsocket/tests/TESTS/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ if("MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=WIFI" IN_LIST MBED_CONFIG_DE
endif()

# Tests can link one of the below two libraries to use lwipstack or nanostack
add_library(mbed-netsocket-tests-use-lwipstack STATIC greentea_network_stack_lwipstack.cpp)
add_library(mbed-netsocket-tests-use-lwipstack STATIC EXCLUDE_FROM_ALL greentea_network_stack_lwipstack.cpp)
target_link_libraries(mbed-netsocket-tests-use-lwipstack PUBLIC mbed-lwipstack)

add_library(mbed-netsocket-tests-use-nanostack STATIC greentea_network_stack_nanostack.cpp)
add_library(mbed-netsocket-tests-use-nanostack STATIC EXCLUDE_FROM_ALL greentea_network_stack_nanostack.cpp)
target_link_libraries(mbed-netsocket-tests-use-nanostack PUBLIC mbed-nanostack)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ list(
asynchronous_dns_cache.cpp
)

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "This test requires an RTOS!")
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ list(
tcpsocket_recv_100k.cpp
)

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "This test requires an RTOS!")
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ list(
tlssocket_cert_in_filesystem.cpp
)

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "This test requires an RTOS!")
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ list(APPEND
udpsocket_echotest_burst.cpp
)

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "This test requires an RTOS!")
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ list(
networkinterface_status.cpp
)

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "This test requires an RTOS!")
endif()

Expand Down
4 changes: 2 additions & 2 deletions drivers/tests/TESTS/mbed_drivers/lp_timeout/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ if(NOT "DEVICE_LPTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS)
set(TEST_SKIPPED "Low power ticker not supported for this target")
endif()

if(MBED_GREENTEA_TEST_BAREMETAL)
set(TEST_SKIPPED "Low power timer not supported for this target")
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "Test not supported on baremetal")
endif()

mbed_greentea_add_test(
Expand Down
2 changes: 1 addition & 1 deletion drivers/tests/TESTS/mbed_drivers/race_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2020 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL)
if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "Mutex test cases require RTOS with multithread to run")
endif()

Expand Down
2 changes: 1 addition & 1 deletion drivers/usb/tests/TESTS/usb_device/msd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(NOT "DEVICE_USBDEVICE=1" IN_LIST MBED_TARGET_DEFINITIONS)
set(TEST_SKIPPED "USB Device is not supported for this target")
endif()

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "USB MSD test is not compatible with mbed-baremetal")
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "RTOS required")
endif()

Expand Down
2 changes: 1 addition & 1 deletion platform/tests/TESTS/mbed_platform/atomic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "atomic test cases require a RTOS to run.")
endif()

Expand Down
2 changes: 1 addition & 1 deletion rtos/tests/TESTS/mbed_rtos/MemoryPool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(MBED_GREENTEA_TEST_BAREMETAL)
if(APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "MemoryPool test cases require a RTOS to run.")
endif()

Expand Down
2 changes: 1 addition & 1 deletion rtos/tests/TESTS/mbed_rtos/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL)
if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "RTOS basic test cases require RTOS with multithread to run")
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL)
if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "Condition variable test cases require RTOS with multithread to run")
endif()

Expand Down
2 changes: 1 addition & 1 deletion rtos/tests/TESTS/mbed_rtos/mail/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL)
if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "mail test cases require RTOS with multithread to run")
endif()

Expand Down
2 changes: 1 addition & 1 deletion rtos/tests/TESTS/mbed_rtos/mutex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL)
if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "Mutex test cases require RTOS with multithread to run")
endif()

Expand Down
2 changes: 1 addition & 1 deletion rtos/tests/TESTS/mbed_rtos/queue/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL)
if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "Queue test cases require RTOS with multithread to run")
endif()

Expand Down
2 changes: 1 addition & 1 deletion rtos/tests/TESTS/mbed_rtos/threads/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(mbed_greentea)

if(${MBED_C_LIB} STREQUAL "small" OR MBED_GREENTEA_TEST_BAREMETAL)
if(${MBED_C_LIB} STREQUAL "small" OR APPLICATION_PROFILE_CONFIG_BAREMETAL)
set(TEST_SKIPPED "RTOS basic test cases require RTOS with multithread to run")
endif()

Expand Down

0 comments on commit 87c6694

Please sign in to comment.