Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a new cmake flag to enable isolation #501

Draft
wants to merge 2 commits into
base: rolling
Choose a base branch
from
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