handling broken XML files
This commit is contained in:
parent
71240e7473
commit
22ce8e9632
1 changed files with 10 additions and 1 deletions
|
@ -233,7 +233,16 @@ class BuildReport:
|
|||
else:
|
||||
self.success = False
|
||||
|
||||
self.add_test_results()
|
||||
try:
|
||||
self.add_test_results()
|
||||
except etree.XMLSyntaxError:
|
||||
# Sometimes we get an incomplete XML file.
|
||||
# In this case:
|
||||
# - fail the build (the safe thing to do)
|
||||
# - continue so the user gets some feedback.
|
||||
print('Error parsing {}. Invalid XML syntax!'.format(self.test_result_file))
|
||||
self.success = False
|
||||
|
||||
self.add_clang_tidy()
|
||||
self.add_clang_format()
|
||||
self.api.update_build_status(self.diff_id, self.ph_id, self.working, self.success, self.lint, self.unit)
|
||||
|
|
Loading…
Reference in a new issue