Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nav2_gazebo_spawner generates stderr on Focal #1749

Closed
AlexeyMerzlyakov opened this issue May 18, 2020 · 1 comment
Closed

nav2_gazebo_spawner generates stderr on Focal #1749

AlexeyMerzlyakov opened this issue May 18, 2020 · 1 comment
Labels
0 - Critical Critical to project, highest priority

Comments

@AlexeyMerzlyakov
Copy link
Collaborator

AlexeyMerzlyakov commented May 18, 2020

nav2_gazebo_spawner package is generating stderr warning message during local testing on Ubuntu 20.04 with pre-Foxy installed. Fail log is as follows:

leha@leha-PC:~/navigation2_ws$ colcon test --packages-select nav2_gazebo_spawner
Starting >>> nav2_gazebo_spawner
--- stderr: nav2_gazebo_spawner                   
=============================== warnings summary ===============================
/home/leha/.local/lib/python3.8/site-packages/_pytest/junitxml.py:417
  Warning: The 'junit_family' default value will change to 'xunit2' in pytest 6.0.
  Add 'junit_family=xunit1' to your pytest.ini file to keep the current format in future versions of pytest and silence this warning.

-- Docs: https://docs.pytest.org/en/latest/warnings.html
---
Finished <<< nav2_gazebo_spawner [1.88s]

Summary: 1 package finished [2.19s]
  1 package had stderr output: nav2_gazebo_spawner

This warning was also in Bionic with ROS2 Eloquent onboard, but it was threatened as warning and appeared in stdout instead. In pytest v5.2+ the junit_family value should be explicitly specified in pytest config file: https://docs.pytest.org/en/latest/deprecations.html#junit-family-default-value-change-to-xunit2.

Supposed fix for that:

diff --git a/nav2_bringup/nav2_gazebo_spawner/setup.cfg b/nav2_bringup/nav2_gazebo_spawner/setup.cfg
index 598b7c2d..3edf46fb 100644
--- a/nav2_bringup/nav2_gazebo_spawner/setup.cfg
+++ b/nav2_bringup/nav2_gazebo_spawner/setup.cfg
@@ -2,3 +2,5 @@
 script-dir=$base/lib/nav2_gazebo_spawner
 [install]
 install-scripts=$base/lib/nav2_gazebo_spawner
+[tool:pytest]
+junit_family=xunit2
@SteveMacenski
Copy link
Member

LGTM, please submit a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Critical Critical to project, highest priority
Projects
None yet
Development

No branches or pull requests

2 participants