File tree 3 files changed +27
-0
lines changed
colcon_ros_cargo/task/ament_cargo
3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,10 @@ def _build_cmd(self, cargo_args):
89
89
'--quiet'
90
90
] + cargo_args
91
91
92
+ # Installation is done by cargo ament-build
93
+ def _install_cmd (self , cargo_args ): # noqa: D102
94
+ pass
95
+
92
96
93
97
def write_cargo_config_toml (package_paths ):
94
98
"""Write the resolved package paths to config.toml.
Original file line number Diff line number Diff line change
1
+ # Licensed under the Apache License, Version 2.0
2
+
3
+ from colcon_cargo .task .cargo .test import CargoTestTask
4
+ from colcon_core .plugin_system import satisfies_version
5
+ from colcon_core .task import TaskExtensionPoint
6
+
7
+
8
+ class AmentCargoTestTask (CargoTestTask ):
9
+ """A test task for packages with Cargo.toml + package.xml.
10
+
11
+ Tests are already built by `colcon build` so this task only needs to
12
+ run them and doesn't need to worry about dependency management
13
+ (unlike the `AmentCargoBuildTask`).
14
+ """
15
+
16
+ def __init__ (self ): # noqa: D107
17
+ super ().__init__ ()
18
+ satisfies_version (TaskExtensionPoint .EXTENSION_POINT_VERSION , '^1.0' )
19
+
20
+ def add_arguments (self , * , parser ): # noqa: D102
21
+ pass
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ colcon_core.package_identification =
72
72
ament_cargo = colcon_ros_cargo.package_identification.ament_cargo:AmentCargoPackageIdentification
73
73
colcon_core.task.build =
74
74
ament_cargo = colcon_ros_cargo.task.ament_cargo.build:AmentCargoBuildTask
75
+ colcon_core.task.test =
76
+ ament_cargo = colcon_ros_cargo.task.ament_cargo.test:AmentCargoTestTask
75
77
76
78
[flake8]
77
79
import-order-style = google
You can’t perform that action at this time.
0 commit comments