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

Conversation

adityapande-1995
Copy link

@adityapande-1995 adityapande-1995 commented Jan 30, 2024

This adds a new cmake argument called "ISOLATE_TEST" to use https://github.com/adityapande-1995/linux_isolate_process for isolating a test. This would mean more tests can be run in parallel, and can speed up CI. Due to the underlying implementation using the unshare system call, this can only be used in linux.

The proposal is to add linux_isolate_process as a dependency of ament_cmake_test, so that downstream packages get it for free, and hopefully add linux_isolate_process as a core package in ROS 2.

Custom repos file : https://gist.github.com/adityapande-1995/0f05b9acf72be5fbb34e80e4342cfe26

The plan further is to add a similar pytest plugin.

Copy link
Contributor

@cottsay cottsay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also trigger a build where the flag is inverted and unconditionally enabled so we can "see what breaks" :)

ament_cmake_test/cmake/ament_add_test.cmake Outdated Show resolved Hide resolved
ament_cmake_test/cmake/ament_add_test.cmake Outdated Show resolved Hide resolved
Signed-off-by: Aditya Pande <[email protected]>
@adityapande-1995
Copy link
Author

adityapande-1995 commented Jan 31, 2024

Build round 2, with isolation enabled and a parallel executor :

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

Build args : --event-handlers console_cohesion+ console_package_list+ --cmake-args -DINSTALL_EXAMPLES=OFF -DSECURITY=ON -DAPPEND_PROJECT_NAME_TO_INCLUDEDIR=ON -DISOLATE_TEST=ON
Test args : --event-handlers console_cohesion+ --retest-until-pass 2 --ctest-args -LE xfail --pytest-args -m "not xfail"

Without isolation but with a parallel executor :

Build args : --event-handlers console_cohesion+ console_package_list+ --cmake-args -DINSTALL_EXAMPLES=OFF -DSECURITY=ON -DAPPEND_PROJECT_NAME_TO_INCLUDEDIR=ON
Test args : --event-handlers console_cohesion+ --retest-until-pass 2 --ctest-args -LE xfail --pytest-args -m "not xfail"

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@adityapande-1995
Copy link
Author

adityapande-1995 commented Feb 2, 2024

TODO :

  • Make a pytest plguin out of linux_isolate_process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants