rust/tests/run-make/libtest-junit/validate_junit.py
Augie Fackler d77f636c63 libtest: add tests for junit output format
I'm about to make some changes here, and it was making me uneasy to
modify the output format without test coverage.
2023-04-21 13:15:04 -04:00

13 lines
283 B
Python
Executable File

#!/usr/bin/env python
import sys
import xml.etree.ElementTree as ET
# Try to decode line in order to ensure it is a valid XML document
for line in sys.stdin:
try:
ET.fromstring(line)
except ET.ParseError as pe:
print("Invalid xml: %r" % line)
raise