From bbbe292852e08167f0c772473178db1f17945792 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 29 May 2017 12:35:31 +0900 Subject: [PATCH] Added option NOSE_OPT to catkin_add_nosetests func 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 --- cmake/nosetests.cmake.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmake/nosetests.cmake.in b/cmake/nosetests.cmake.in index 85d8eb9..ca6595a 100644 --- a/cmake/nosetests.cmake.in +++ b/cmake/nosetests.cmake.in @@ -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() \ No newline at end of file +endmacro()