Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ament_cmake_test/cmake/ament_add_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ function(ament_add_test testname)
if(NOT ARG_RUNNER)
set(ARG_RUNNER "${ament_cmake_test_DIR}/run_test.py")
endif()
if(NOT ARG_TIMEOUT)
if(NOT DEFINED ARG_TIMEOUT OR "${ARG_TIMEOUT}" STREQUAL "")
set(ARG_TIMEOUT 60)
endif()
if(NOT ARG_TIMEOUT GREATER 0)
message(FATAL_ERROR "ament_add_test() the TIMEOUT argument must be a "
"valid number and greater than zero")
if(NOT ARG_TIMEOUT GREATER_EQUAL 0)
message(FATAL_ERROR "ament_add_test() the TIMEOUT argument must be a positive number OR zero (for unlimited time)")
endif()
if(NOT ARG_WORKING_DIRECTORY)
set(ARG_WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
Expand Down