-
Notifications
You must be signed in to change notification settings - Fork 105
use distinct xunit pattern for ROS 2 #828
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -600,9 +600,21 @@ def get_packages_in_workspaces(workspace_roots, condition_context=None): | |
| return pkgs | ||
|
|
||
|
|
||
| def get_xunit_publisher_types_and_patterns(): | ||
| def get_xunit_publisher_types_and_patterns( | ||
| ros_version, pytest_junit_compliant | ||
| ): | ||
| types = [] | ||
| types.append(('GoogleTestType', 'ws/test_results/**/*.xml')) | ||
| if ros_version == 1: | ||
| types.append(('GoogleTestType', 'ws/test_results/**/*.xml')) | ||
| elif ros_version == 2: | ||
| types.append(('CTestType', 'ws/test_results/*/Testing/*/Test.xml')) | ||
| types.append(('GoogleTestType', 'ws/test_results/**/*.gtest.xml')) | ||
| types.append(( | ||
| 'JUnitType' if pytest_junit_compliant else 'GoogleTestType', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not super clear in the pytest documentation or in the deprecation warnings produced, but testing locally I've observed that using pytest version >= 6 does not imply that the junit_family type will be xunit2. In fact, if you don't explicitly set the junit_family (either with a I think this only happened to work for Rolling because of all of the backports explicitly setting the junit_family in pytest.ini files (ros2/ros2#951).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #836 for a proposed fix. |
||
| 'ws/test_results/*/pytest.xml')) | ||
| types.append(('JUnitType', 'ws/test_results/**/*.xunit.xml')) | ||
| else: | ||
| assert False, 'Unsupported ROS version: ' + str(ros_version) | ||
| return types | ||
|
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.