|
6 | 6 |
|
7 | 7 | from .common import ExitCode, copytree_with_local_backend, verify_cli_command |
8 | 8 |
|
9 | | - |
10 | 9 | ROS_WORKSPACE_NAME = "ros-workspace" |
11 | 10 | ROS_PACKAGE_DIRS = ["navigator", "navigator_py", "distro_less_package"] |
12 | 11 | ROS_IMPLICIT_PACKAGE_DIR = "navigator_implicit" |
@@ -156,63 +155,3 @@ def test_ros_packages_build_point_to_implicit_package_xml_fails( |
156 | 155 | "did you mean package.xml", |
157 | 156 | ], |
158 | 157 | ) |
159 | | - |
160 | | - |
161 | | -def test_ros_input_globs(pixi: Path, build_data: Path, tmp_pixi_workspace: Path) -> None: |
162 | | - workspace = _prepare_ros_workspace(build_data, tmp_pixi_workspace) |
163 | | - output_dir = workspace.joinpath("dist") |
164 | | - output_dir.mkdir(parents=True, exist_ok=True) |
165 | | - |
166 | | - manifest_path = workspace.joinpath("src", "navigator_py", "pixi.toml") |
167 | | - |
168 | | - verify_cli_command( |
169 | | - [ |
170 | | - pixi, |
171 | | - "build", |
172 | | - "--path", |
173 | | - manifest_path, |
174 | | - "--output-dir", |
175 | | - output_dir, |
176 | | - ] |
177 | | - ) |
178 | | - |
179 | | - metadata = _load_package_metadata(workspace, ROS_PACKAGE_OUTPUT_NAMES["navigator_py"]) |
180 | | - globs = metadata.get("input_hash", {}).get("globs", []) |
181 | | - print(globs) |
182 | | - assert {"hi"}.issubset(set(globs)) |
183 | | - |
184 | | - |
185 | | -def test_ros_rebuild_on_source_change( |
186 | | - pixi: Path, build_data: Path, tmp_pixi_workspace: Path |
187 | | -) -> None: |
188 | | - workspace = _prepare_ros_workspace(build_data, tmp_pixi_workspace) |
189 | | - output_dir = workspace.joinpath("dist") |
190 | | - output_dir.mkdir(parents=True, exist_ok=True) |
191 | | - |
192 | | - manifest_path = workspace.joinpath("src", "navigator_py", "pixi.toml") |
193 | | - package_name = ROS_PACKAGE_OUTPUT_NAMES["navigator_py"] |
194 | | - |
195 | | - def build_and_get_hash() -> str: |
196 | | - verify_cli_command( |
197 | | - [ |
198 | | - pixi, |
199 | | - "build", |
200 | | - "--path", |
201 | | - manifest_path, |
202 | | - "--output-dir", |
203 | | - output_dir, |
204 | | - ] |
205 | | - ) |
206 | | - metadata = _load_package_metadata(workspace, package_name) |
207 | | - hash_value = metadata.get("input_hash", {}).get("hash", "") |
208 | | - assert isinstance(hash_value, str) |
209 | | - return hash_value |
210 | | - |
211 | | - initial_hash = build_and_get_hash() |
212 | | - |
213 | | - source_file = workspace.joinpath("src", "navigator_py", "setup.py") |
214 | | - source_file.write_text(source_file.read_text() + "\n# trigger rebuild\n") |
215 | | - |
216 | | - rebuilt_hash = build_and_get_hash() |
217 | | - |
218 | | - assert rebuilt_hash and rebuilt_hash != initial_hash |
0 commit comments