Skip to content

Commit

Permalink
Increased cpplint timeout by default on Windows (#486)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
  • Loading branch information
ahcorde authored Apr 12, 2024
1 parent 8f60367 commit f40df10
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ament_cmake_cpplint/cmake/ament_cpplint.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@ function(ament_cpplint)
endif()
list(APPEND cmd ${ARG_UNPARSED_ARGUMENTS})
if(NOT ARG_TIMEOUT)
set(ARG_TIMEOUT 120)
if(WIN32)
# There are many timeouts when cpplint is executed on Windows,
# increasing the timeout seems to fix the problem.
set(ARG_TIMEOUT 500)
else()
set(ARG_TIMEOUT 120)
endif()
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")
endif()

file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/ament_cpplint")
Expand Down

0 comments on commit f40df10

Please sign in to comment.