Skip to content
Merged
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
14 changes: 9 additions & 5 deletions master/custom/release_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,15 @@ def junit_results(self):
if not filepath.is_file():
return None

with filepath.open() as file:
etree = ElementTree.parse(file)
result = JunitResult(self, {})
with filepath.open('rb') as file:
for _, element in ElementTree.iterparse(file, events=('end',)):
if element.tag == 'testcase':
if element.find('error') is not None:
result.add(element)
element.clear()
elif element.tag == 'testsuite':
element.clear()

# We don't have a logger set up, this returns None on common failures
# (meaning failures won't show on the dashboard).
Expand All @@ -472,9 +479,6 @@ def junit_results(self):
except ElementTree.ParseError as e:
return None

result = JunitResult(self, {})
for element in etree.iterfind('.//error/..'):
result.add(element)
return result

@cached_property
Expand Down