Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mvukov committed Oct 13, 2024
1 parent 577e441 commit 3abb95a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ros2/cc_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ def ros2_cpp_test(name, ros2_package_name = None, set_up_ament = True, idl_deps
Adds common ROS 2 C++ definitions on top of a cc_test.
Please make sure that --sandbox_default_allow_network=false is set in .bazelrc.
This ensures proper network isolation.
Args:
name: A unique target name.
ros2_package_name: If given, defines a ROS package name for the target.
Expand Down
3 changes: 3 additions & 0 deletions ros2/py_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def ros2_py_binary(name, srcs, main, set_up_ament = False, **kwargs):
def ros2_py_test(name, srcs, main, set_up_ament = True, **kwargs):
""" Defines a ROS 2 Python test.
Please make sure that --sandbox_default_allow_network=false is set in .bazelrc.
This ensures proper network isolation.
Args:
name: A unique target name.
srcs: List of source files.
Expand Down
9 changes: 6 additions & 3 deletions ros2/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ load("@rules_ros2_pip_deps//:requirements.bzl", "requirement")
def ros2_test(name, launch_file, nodes = None, deps = None, data = None, idl_deps = None, use_pytest = False, **kwargs):
""" Defines a ROS 2 test.
In case you don't need ROS 2 nodes for tests, but need ament setup such
that e.g. plugins can work: use a lightweight macro ros2_cpp_test
from //ros2:cc_defs.bzl.
For lighter options, e.g. you don't need a launch file, please take a look at:
* ros2_cpp_test in //ros2:cc_defs.bzl and
* ros2_py_test in //ros2:py_defs.bzl
Please make sure that --sandbox_default_allow_network=false is set in .bazelrc.
This ensures proper network isolation.
Args:
name: A unique target name.
Expand Down

0 comments on commit 3abb95a

Please sign in to comment.