Skip to content

Commit 34cdfc9

Browse files
committed
Advise against removing run-make/libtest-junit/validate_junit.py
Trying to get rid of this Python script looks tempting, because it's currently the only Python script in the whole `run-make` suite that we actually run. But getting rid of it would require pulling in a Rust crate to parse XML instead, and that's probably not worth the extra hassle for a relatively-minor test.
1 parent 5fc562c commit 34cdfc9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/run-make/libtest-junit/validate_junit.py

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#!/usr/bin/env python
22

3+
# Trivial Python script that reads lines from stdin, and checks that each line
4+
# is a well-formed XML document.
5+
#
6+
# This takes advantage of the fact that Python has a built-in XML parser,
7+
# whereas doing the same check in Rust would require us to pull in an XML
8+
# crate just for this relatively-minor test.
9+
#
10+
# If you're trying to remove Python scripts from the test suite, think twice
11+
# before removing this one. You could do so, but it's probably not worth it.
12+
313
import sys
414
import xml.etree.ElementTree as ET
515

0 commit comments

Comments
 (0)