refactor: remove '#define MODULE_NAME' from tests

And use target_compile_definitions() instead
This commit is contained in:
Beat Küng
2025-06-17 11:41:01 +02:00
parent 6ce1634dea
commit 9472b4b1f7
3 changed files with 2 additions and 4 deletions
+2
View File
@@ -116,6 +116,8 @@ function(px4_add_functional_gtest)
# also links to fuzztest_gtest_main
test_stubs) # put test_stubs last
target_compile_definitions(${TESTNAME} PRIVATE MODULE_NAME="${TESTNAME}")
if(COMPILE_FLAGS)
target_compile_options(${TESTNAME} PRIVATE ${COMPILE_FLAGS})
endif()
@@ -31,8 +31,6 @@
*
****************************************************************************/
#define MODULE_NAME "manual_control"
#include <gtest/gtest.h>
#include "ManualControl.hpp"
-2
View File
@@ -31,8 +31,6 @@
*
****************************************************************************/
#define MODULE_NAME "rc_update"
#include <gtest/gtest.h>
#include "rc_update.h"