Skip to content

Patch pytest.ini files present in ROS packages to include xunit2 format#406

Merged
j-rivero merged 6 commits intomasterfrom
path_xunit_ini
Mar 11, 2020
Merged

Patch pytest.ini files present in ROS packages to include xunit2 format#406
j-rivero merged 6 commits intomasterfrom
path_xunit_ini

Conversation

@j-rivero
Copy link
Copy Markdown

The change to xunit 2.x Jenkins plugin is not working in situations where ROS packages ship their own pytest.ini file (i.e. ament_package) since it takes precedence over the pytest.ini created in the scripts.

I've tested the changes in this build. Note that failures are coming from cppcheck (which is a different bug) not about pytest.xml.

Alternatively (or in addition) another way of fixing Jenkins would be to include the junit_family directive in the pytest.ini file of each ROS package that has this file in it: ament_package, ament_pyflakes, launch_testing_ros, launch_testing.

@j-rivero
Copy link
Copy Markdown
Author

j-rivero commented Mar 11, 2020

I changed the manipulation of the pytest.ini file to use ConfigParser. Tested in this build https://ci.ros2.org/job/ci_linux-aarch64/5297 Build Status

@j-rivero j-rivero requested a review from dirk-thomas March 11, 2020 17:36
Copy link
Copy Markdown
Member

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With pytest version 6 this setting is only necessary of it is explicitly configured to the legacy value (see https://docs.pytest.org/en/latest/changelog.html#pytest-5-3-0-2019-11-19). This can be implemented in a follow up PR to not block merging this fix.

@j-rivero
Copy link
Copy Markdown
Author

new changes tested here Build Status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants