diff --git a/cmake/gtest/px4_add_gtest.cmake b/cmake/gtest/px4_add_gtest.cmake index 5125104e7c..8fd367b3da 100644 --- a/cmake/gtest/px4_add_gtest.cmake +++ b/cmake/gtest/px4_add_gtest.cmake @@ -53,7 +53,7 @@ function(px4_add_gtest) # infer test name from source filname get_filename_component(TESTNAME ${SRC} NAME_WE) string(REPLACE Test "" TESTNAME ${TESTNAME}) - set(TESTNAME UnitTest-${TESTNAME}) + set(TESTNAME unit-${TESTNAME}) # build a binary for the unit test add_executable(${TESTNAME} EXCLUDE_FROM_ALL ${SRC}) diff --git a/platforms/posix/cmake/sitl_tests.cmake b/platforms/posix/cmake/sitl_tests.cmake index 0545b9ce68..1deff3d850 100644 --- a/platforms/posix/cmake/sitl_tests.cmake +++ b/platforms/posix/cmake/sitl_tests.cmake @@ -54,9 +54,10 @@ if (CMAKE_SYSTEM_NAME STREQUAL "CYGWIN") endif() foreach(test_name ${tests}) + set(test_name_prefix sitl-${test_name}) configure_file(${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_template.in ${PX4_SOURCE_DIR}/posix-configs/SITL/init/test/test_${test_name}_generated) - add_test(NAME ${test_name} + add_test(NAME ${test_name_prefix} COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh $ none @@ -66,10 +67,10 @@ foreach(test_name ${tests}) ${PX4_BINARY_DIR} WORKING_DIRECTORY ${SITL_WORKING_DIR}) - set_tests_properties(${test_name} PROPERTIES FAIL_REGULAR_EXPRESSION "${test_name} FAILED") - set_tests_properties(${test_name} PROPERTIES PASS_REGULAR_EXPRESSION "${test_name} PASSED") + set_tests_properties(${test_name_prefix} PROPERTIES FAIL_REGULAR_EXPRESSION "${test_name} FAILED") + set_tests_properties(${test_name_prefix} PROPERTIES PASS_REGULAR_EXPRESSION "${test_name} PASSED") - sanitizer_fail_test_on_error(${test_name}) + sanitizer_fail_test_on_error(${test_name_prefix}) endforeach()