From e7c062b1d2811f519c1f988f658fecfa5c4211de Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Mon, 24 Aug 2020 12:06:13 -0700 Subject: [PATCH] Only use xUnit type JUnit for *.xunit.xml results if pytest compliant Sometimes pytest results are put into files with extension *.xunit.xml, for example, if added with `ament_cmake_pytest`. Signed-off-by: Jacob Perron --- ros_buildfarm/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ros_buildfarm/common.py b/ros_buildfarm/common.py index eb914bfc6..db62ec1e0 100644 --- a/ros_buildfarm/common.py +++ b/ros_buildfarm/common.py @@ -612,7 +612,10 @@ def get_xunit_publisher_types_and_patterns( types.append(( 'JUnitType' if pytest_junit_compliant else 'GoogleTestType', 'ws/test_results/*/pytest.xml')) - types.append(('JUnitType', 'ws/test_results/**/*.xunit.xml')) + # ament_cmake_pytest doesn't produce a pytest.xml + types.append(( + 'JUnitType' if pytest_junit_compliant else 'GoogleTestType', + 'ws/test_results/**/*.xunit.xml')) else: assert False, 'Unsupported ROS version: ' + str(ros_version) return types