freedreno/regs: Print xml validation error if validation fails

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23881>
This commit is contained in:
Danylo Piliaiev 2023-04-20 16:59:02 +02:00 committed by Marge Bot
parent 431bbea840
commit 148f214dae

View file

@ -429,7 +429,8 @@ class Parser(object):
xml_doc = etree.parse(filename)
if not xmlschema.validate(xml_doc):
raise self.error("Schema validation failed for: " + filename)
error_str = str(xmlschema.error_log.filter_from_errors()[0])
raise self.error("Schema validation failed for: " + filename + "\n" + error_str)
except ImportError:
print("lxml not found, skipping validation", file=sys.stderr)