Skip to content

Commit

Permalink
Make finding aggregator_node runfile bzlmod compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
lalten committed Jan 30, 2024
1 parent 4b8441a commit 14943aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions ros2/test/diagnostics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ ros2_test(
deps = [
"@ros2_common_interfaces//:py_diagnostic_msgs",
"@ros2_rclpy//:rclpy",
"@rules_python//python/runfiles",
],
)
6 changes: 5 additions & 1 deletion ros2/test/diagnostics/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
import launch_testing.actions
import launch_testing.asserts
import launch_testing.markers
import python.runfiles
import rclpy

AGGREGATOR_NODE_PATH = python.runfiles.Runfiles.Create().Rlocation(
'ros2_diagnostics/aggregator_node')


@launch_testing.markers.keep_alive
def generate_test_description():
Expand All @@ -32,7 +36,7 @@ def generate_test_description():
)

aggregator_node = launch_ros.actions.Node(
executable='../ros2_diagnostics/aggregator_node',
executable=AGGREGATOR_NODE_PATH,
name='diagnostic_aggregator',
parameters=['ros2/test/diagnostics/aggregator_config.yaml'],
)
Expand Down

0 comments on commit 14943aa

Please sign in to comment.