Skip to content

Force xunit2 for pytest 6.0 when legacy mode is enabled#415

Merged
j-rivero merged 8 commits intomasterfrom
pytest6_xunit
Jun 5, 2020
Merged

Force xunit2 for pytest 6.0 when legacy mode is enabled#415
j-rivero merged 8 commits intomasterfrom
pytest6_xunit

Conversation

@j-rivero
Copy link
Copy Markdown

following #406 (review)
pytest 6.x enables by default the xunit2 format (the one needed by ci.ros2.org Jenkins). With this version we won't need to force the pytest.ini patching in ROS packages. However, upstream could declare the use of the legacy mode not to use xunit2 format. This PR detects these cases and patch them accordingly if legacy is being used.

Tested: Build Status
(Tests errors seems unrelated to me, xunit2 patching is done right as far as I can tell).

if config.get('pytest', 'junit_family') != 'legacy':
continue
except configparser.NoOptionError:
continue
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am wondering if the duplicate logic in the if and else block can't be avoided...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

the code was awful, yes. I made some changes in 057c1f7 . Hopefully it can be read more easily.

@dirk-thomas
Copy link
Copy Markdown
Member

@j-rivero Friendly ping.

2 similar comments
@dirk-thomas
Copy link
Copy Markdown
Member

@j-rivero Friendly ping.

@dirk-thomas
Copy link
Copy Markdown
Member

@j-rivero Friendly ping.

@j-rivero
Copy link
Copy Markdown
Author

j-rivero commented Apr 27, 2020

Another round of testing for package up to rclcpp Build Status

@j-rivero
Copy link
Copy Markdown
Author

j-rivero commented Jun 5, 2020

New round of CI Build Status

@dirk-thomas
Copy link
Copy Markdown
Member

(I just made some minor non-functional edits.)

@j-rivero j-rivero merged commit 3f57d6d into master Jun 5, 2020
@delete-merged-branch delete-merged-branch bot deleted the pytest6_xunit branch June 5, 2020 16:38
@j-rivero
Copy link
Copy Markdown
Author

j-rivero commented Jun 5, 2020

Final test run https://ci.ros2.org/job/ci_linux/11030/console

nuclearsandwich added a commit that referenced this pull request Jun 8, 2020
j-rivero pushed a commit that referenced this pull request Jun 8, 2020
j-rivero pushed a commit that referenced this pull request Jun 8, 2020
j-rivero pushed a commit that referenced this pull request Jun 9, 2020
This reverts commit d3de5ef.
j-rivero pushed a commit that referenced this pull request Jun 9, 2020
j-rivero pushed a commit that referenced this pull request Jun 9, 2020
j-rivero pushed a commit that referenced this pull request Jun 9, 2020
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