diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/CMakeLists.txt b/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/CMakeLists.txt index 428cac1..76f3c8a 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/CMakeLists.txt +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/CMakeLists.txt @@ -13,6 +13,7 @@ DEVICE_INTERRUPTIN=1 MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 MBED_CONF_CELLULAR_AT_HANDLER_BUFFER_SIZE=32 + MBED_CONF_RTOS_PRESENT=1 ) target_sources(${TEST_NAME} diff --git a/rtos/include/rtos/Thread.h b/rtos/include/rtos/Thread.h index ec698c3..1aa72de 100644 --- a/rtos/include/rtos/Thread.h +++ b/rtos/include/rtos/Thread.h @@ -33,7 +33,7 @@ #include "rtos/Semaphore.h" #include "rtos/Mutex.h" -#if MBED_CONF_RTOS_PRESENT || defined(DOXYGEN_ONLY) || defined(UNITTEST) +#if MBED_CONF_RTOS_PRESENT || defined(DOXYGEN_ONLY) namespace rtos { /** \addtogroup rtos-public-api */ diff --git a/rtos/include/rtos/internal/mbed_rtos1_types.h b/rtos/include/rtos/internal/mbed_rtos1_types.h index e178b27..a2a1800 100644 --- a/rtos/include/rtos/internal/mbed_rtos1_types.h +++ b/rtos/include/rtos/internal/mbed_rtos1_types.h @@ -17,7 +17,7 @@ #ifndef MBED_RTOS_RTX1_TYPES_H #define MBED_RTOS_RTX1_TYPES_H -#if MBED_CONF_RTOS_PRESENT || defined(UNITTEST) +#if MBED_CONF_RTOS_PRESENT #include "cmsis_os.h" diff --git a/rtos/include/rtos/internal/mbed_rtos_storage.h b/rtos/include/rtos/internal/mbed_rtos_storage.h index 750725d..c9b06fa 100644 --- a/rtos/include/rtos/internal/mbed_rtos_storage.h +++ b/rtos/include/rtos/internal/mbed_rtos_storage.h @@ -17,7 +17,7 @@ #ifndef MBED_RTOS_STORAGE_H #define MBED_RTOS_STORAGE_H -#if MBED_CONF_RTOS_PRESENT || defined(UNITTEST) +#if MBED_CONF_RTOS_PRESENT #include "mbed_rtx_storage.h" diff --git a/rtos/include/rtos/mbed_rtos_types.h b/rtos/include/rtos/mbed_rtos_types.h index eaf5da0..40bd9d9 100644 --- a/rtos/include/rtos/mbed_rtos_types.h +++ b/rtos/include/rtos/mbed_rtos_types.h @@ -17,7 +17,7 @@ #ifndef RTOS_TYPES_H_ #define RTOS_TYPES_H_ -#if MBED_CONF_RTOS_PRESENT || defined(DOXYGEN_ONLY) || defined(UNITTEST) +#if MBED_CONF_RTOS_PRESENT || defined(DOXYGEN_ONLY) #include "cmsis_os2.h" #else diff --git a/rtos/tests/UNITTESTS/doubles/CMakeLists.txt b/rtos/tests/UNITTESTS/doubles/CMakeLists.txt index 4216a6a..e827f16 100644 --- a/rtos/tests/UNITTESTS/doubles/CMakeLists.txt +++ b/rtos/tests/UNITTESTS/doubles/CMakeLists.txt @@ -18,7 +18,10 @@ add_library(mbed-stubs-rtos) -add_definitions(-DUNITTEST) +target_compile_definitions(mbed-stubs-rtos + PRIVATE + MBED_CONF_RTOS_PRESENT=1 +) target_sources(mbed-stubs-rtos PRIVATE