From 8486b2b9172d3b11e30a5adc34d8351308327af7 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 12 Dec 2018 18:11:04 +0100 Subject: [PATCH] tests: properly disable shutdown test for Cygwin --- platforms/posix/cmake/sitl_tests.cmake | 30 ++++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/platforms/posix/cmake/sitl_tests.cmake b/platforms/posix/cmake/sitl_tests.cmake index 6a0c3d1537..778cfab3ec 100644 --- a/platforms/posix/cmake/sitl_tests.cmake +++ b/platforms/posix/cmake/sitl_tests.cmake @@ -46,7 +46,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "CYGWIN") list(REMOVE_ITEM tests hysteresis # Intermittent timing fails. uorb - shutdown # A mystery why it fails. ) endif() @@ -85,20 +84,23 @@ set_tests_properties(mavlink PROPERTIES FAIL_REGULAR_EXPRESSION "mavlink FAILED" set_tests_properties(mavlink PROPERTIES PASS_REGULAR_EXPRESSION "mavlink PASSED") sanitizer_fail_test_on_error(mavlink) -# Shutdown test -add_test(NAME shutdown - COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh - $ - none - none - test_shutdown - ${PX4_SOURCE_DIR} - ${PX4_BINARY_DIR} - WORKING_DIRECTORY ${SITL_WORKING_DIR}) +# A mystery why this fails on Cygwin currently. +if(NOT CMAKE_SYSTEM_NAME STREQUAL "CYGWIN") + # Shutdown test + add_test(NAME shutdown + COMMAND ${PX4_SOURCE_DIR}/Tools/sitl_run.sh + $ + none + none + test_shutdown + ${PX4_SOURCE_DIR} + ${PX4_BINARY_DIR} + WORKING_DIRECTORY ${SITL_WORKING_DIR}) -#set_tests_properties(shutdown PROPERTIES FAIL_REGULAR_EXPRESSION "shutdown FAILED") -set_tests_properties(shutdown PROPERTIES PASS_REGULAR_EXPRESSION "Shutting down") -sanitizer_fail_test_on_error(shutdown) + #set_tests_properties(shutdown PROPERTIES FAIL_REGULAR_EXPRESSION "shutdown FAILED") + set_tests_properties(shutdown PROPERTIES PASS_REGULAR_EXPRESSION "Shutting down") + sanitizer_fail_test_on_error(shutdown) +endif() # Dynamic module loading test add_test(NAME dyn