2022-04-28 10:09:15 +02:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
|
|
from lxml import etree
|
|
|
|
|
import sys
|
|
|
|
|
|
2024-02-05 15:24:33 -06:00
|
|
|
|
2022-04-28 10:09:15 +02:00
|
|
|
def format_title(title):
|
|
|
|
|
"""Put title in a box"""
|
|
|
|
|
box = {
|
2024-02-05 15:24:33 -06:00
|
|
|
"tl": "╔",
|
|
|
|
|
"tr": "╗",
|
|
|
|
|
"bl": "╚",
|
|
|
|
|
"br": "╝",
|
|
|
|
|
"h": "═",
|
|
|
|
|
"v": "║",
|
2022-04-28 10:09:15 +02:00
|
|
|
}
|
2024-02-05 15:24:33 -06:00
|
|
|
hline = box["h"] * (len(title) + 2)
|
|
|
|
|
|
|
|
|
|
return "\n".join(
|
|
|
|
|
[
|
|
|
|
|
f"{box['tl']}{hline}{box['tr']}",
|
|
|
|
|
f"{box['v']} {title} {box['v']}",
|
|
|
|
|
f"{box['bl']}{hline}{box['br']}",
|
|
|
|
|
]
|
|
|
|
|
)
|
2022-04-28 10:09:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
tree = etree.parse(sys.argv[1])
|
2024-02-05 15:24:33 -06:00
|
|
|
for suite in tree.xpath("/testsuites/testsuite"):
|
|
|
|
|
skipped = suite.get("skipped")
|
2022-04-28 10:09:15 +02:00
|
|
|
if int(skipped) != 0:
|
2024-02-05 15:24:33 -06:00
|
|
|
print(
|
|
|
|
|
format_title(
|
|
|
|
|
"Tests were skipped when they should not have been. All the tests must be run in the CI"
|
|
|
|
|
),
|
|
|
|
|
end="\n\n",
|
|
|
|
|
flush=True,
|
|
|
|
|
)
|
2022-04-28 10:09:15 +02:00
|
|
|
sys.exit(1)
|