Skip to content

Commit

Permalink
Added option NOSE_OPT to catkin_add_nosetests func
Browse files Browse the repository at this point in the history
In order to use some specific option for nosetests we now have a NOSE_OPT
parameter that allow to use some customs options for launching nosetests
  • Loading branch information
yotabits committed May 29, 2017
1 parent 2288541 commit bbbe292
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmake/nosetests.cmake.in
Original file line number Diff line number Diff line change
@@ -34,7 +34,8 @@ function(catkin_add_nosetests path)
return()
endif()

cmake_parse_arguments(_nose "" "TIMEOUT;WORKING_DIRECTORY" "DEPENDENCIES" ${ARGN})

cmake_parse_arguments(_nose "" "TIMEOUT;WORKING_DIRECTORY;NOSE_OPT" "DEPENDENCIES" ${ARGN})
if(NOT _nose_TIMEOUT)
set(_nose_TIMEOUT 60)
endif()
@@ -79,8 +80,8 @@ function(catkin_add_nosetests path)
else()
set(tests "${_path_name}")
endif()
set(cmd ${cmd} "${CATKIN_ENV} ${CATKIN_PIP_NOSETESTS} -P --process-timeout=${_nose_TIMEOUT} ${tests} --with-xunit --xunit-file=${output_path}/nosetests-${output_file_name}.xml${_covarg}")
catkin_run_tests_target("nosetests" ${output_file_name} "nosetests-${output_file_name}.xml" COMMAND ${cmd} DEPENDENCIES ${_nose_DEPENDENCIES} WORKING_DIRECTORY ${_nose_WORKING_DIRECTORY})
set(cmd ${cmd} "${CATKIN_ENV} ${CATKIN_PIP_NOSETESTS} -P --process-timeout=${_nose_TIMEOUT} ${tests} ${_nose_NOSE_OPT} --with-xunit --xunit-file=${output_path}/nosetests-${output_file_name}.xml${_covarg}")
catkin_run_tests_target("nosetests" ${output_file_name} "nosetests-${output_file_name}.xml" COMMAND ${cmd} DEPENDENCIES ${_nose_DEPENDENCIES} WORKING_DIRECTORY ${_nose_WORKING_DIRECTORY})
endfunction()

# Providing another catkin nosetests usage...
@@ -119,4 +120,4 @@ macro(_strip_path_prefix var value prefix)
endif()
endif()
endif()
endmacro()
endmacro()

0 comments on commit bbbe292

Please sign in to comment.