Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ros_buildfarm/ci_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ def _get_ci_job_config(

# only Ubuntu Focal has a new enough pytest version which generates
# JUnit compliant result files
'xunit_publisher_types': get_xunit_publisher_types_and_patterns(
ros_version, os_name == 'ubuntu' and os_code_name != 'bionic'),
'xunit_publisher_types': get_xunit_publisher_types_and_patterns(),
}
job_config = expand_template(template_name, job_data)
return job_config
15 changes: 2 additions & 13 deletions ros_buildfarm/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,18 +591,7 @@ def get_package_repo_data(repository_baseurl, targets, cache_dir):
return data


def get_xunit_publisher_types_and_patterns(
ros_version, pytest_junit_compliant,
):
def get_xunit_publisher_types_and_patterns():
types = []
if ros_version == 1:
types.append(('GoogleTestType', 'ws/test_results/**/*.xml'))
elif ros_version == 2:
types.append(('GoogleTestType', 'ws/test_results/**/*.gtest.xml'))
types.append((
'JUnitType' if pytest_junit_compliant else 'GoogleTestType',
'ws/test_results/**/pytest.xml'))
types.append(('JUnitType', 'ws/test_results/**/*.xunit.xml'))
else:
assert False, 'Unsupported ROS version: ' + str(ros_version)
types.append(('GoogleTestType', 'ws/test_results/**/*.xml'))
return types
3 changes: 1 addition & 2 deletions ros_buildfarm/devel_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,7 @@ def _get_devel_job_config(

# only Ubuntu Focal has a new enough pytest version which generates
# JUnit compliant result files
'xunit_publisher_types': get_xunit_publisher_types_and_patterns(
ros_version, os_name == 'ubuntu' and os_code_name != 'bionic'),
'xunit_publisher_types': get_xunit_publisher_types_and_patterns(),

'git_ssh_credential_id': config.git_ssh_credential_id,

Expand Down