Skip to content

Commit

Permalink
Use python3 coverage instead of ros2 run in tests
Browse files Browse the repository at this point in the history
This way we should get coverage
  • Loading branch information
fmauch committed Sep 20, 2024
1 parent a8f9c62 commit ad8cfa5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controller_manager/test/test_hardware_spawner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ class TestHardwareSpawner : public ControllerManagerFixture<controller_manager::

int call_spawner(const std::string extra_args)
{
std::string spawner_script = "ros2 run controller_manager hardware_spawner ";
std::string spawner_script =
"python3 -m coverage run --append --branch $(ros2 pkg prefix "
"controller_manager)/lib/controller_manager/hardware_spawner ";
return std::system((spawner_script + extra_args).c_str());
}

Expand Down

0 comments on commit ad8cfa5

Please sign in to comment.