Skip to content
Draft
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion ament_cmake_test/cmake/ament_add_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#
function(ament_add_test testname)
cmake_parse_arguments(ARG
"GENERATE_RESULT_FOR_RETURN_CODE_ZERO;SKIP_TEST"
"GENERATE_RESULT_FOR_RETURN_CODE_ZERO;SKIP_TEST;ISOLATE_TEST"
"OUTPUT_FILE;RESULT_FILE;RUNNER;SKIP_RETURN_CODE;TIMEOUT;WORKING_DIRECTORY"
"APPEND_ENV;APPEND_LIBRARY_DIRS;COMMAND;ENV"
${ARGN})
Expand Down Expand Up @@ -88,6 +88,9 @@ function(ament_add_test testname)
set(cmd_wrapper "${python_interpreter}" "-u" "${ARG_RUNNER}"
"${ARG_RESULT_FILE}"
"--package-name" "${PROJECT_NAME}")
if(ISOLATE_TEST AND UNIX)
list(PREPEND cmd_wrapper "{python_interpreter}" "-m" "linux_isolate_process")
endif()
if(ARG_SKIP_TEST)
list(APPEND cmd_wrapper "--skip-test")
set(ARG_SKIP_RETURN_CODE 0)
Expand Down
1 change: 1 addition & 0 deletions ament_cmake_test/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<buildtool_depend>ament_cmake_python</buildtool_depend>

<buildtool_export_depend>ament_cmake_core</buildtool_export_depend>
<buildtool_export_depend>linux_isolate_process</buildtool_export_depend>

<export>
<build_type>ament_cmake</build_type>
Expand Down