diff options
Diffstat (limited to 'tools/run_tests/python_utils/report_utils.py')
-rw-r--r-- | tools/run_tests/python_utils/report_utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/run_tests/python_utils/report_utils.py b/tools/run_tests/python_utils/report_utils.py index 3b2b4f8712..c7c0ceea92 100644 --- a/tools/run_tests/python_utils/report_utils.py +++ b/tools/run_tests/python_utils/report_utils.py @@ -77,6 +77,10 @@ def render_junit_xml_report(resultset, xml_report, suite_package='grpc', ET.SubElement(xml_test, 'error', message='Timeout') elif result.state == 'SKIPPED': ET.SubElement(xml_test, 'skipped', message='Skipped') + # ensure the report directory exists + report_dir = os.path.dirname(os.path.abspath(xml_report)) + if not os.path.exists(report_dir): + os.makedirs(report_dir) tree = ET.ElementTree(root) tree.write(xml_report, encoding='UTF-8') |