about summary refs log tree commit diff
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-08-22 11:58:46 +1000
committerZalathar <Zalathar@users.noreply.github.com>2024-08-22 12:13:25 +1000
commit34cdfc9b490c7d7cc284fcdaf2338976ee6329bf (patch)
tree8288567cef0d08e84d720478954a61d932d72642
parent5fc562c5b1a53fd78ecad2da7481c0559705307b (diff)
downloadrust-34cdfc9b490c7d7cc284fcdaf2338976ee6329bf.tar.gz
rust-34cdfc9b490c7d7cc284fcdaf2338976ee6329bf.zip
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.
-rwxr-xr-xtests/run-make/libtest-junit/validate_junit.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run-make/libtest-junit/validate_junit.py b/tests/run-make/libtest-junit/validate_junit.py
index 0d9b34a3cf7..f92473751b0 100755
--- a/tests/run-make/libtest-junit/validate_junit.py
+++ b/tests/run-make/libtest-junit/validate_junit.py
@@ -1,5 +1,15 @@
 #!/usr/bin/env python
 
+# Trivial Python script that reads lines from stdin, and checks that each line
+# is a well-formed XML document.
+#
+# This takes advantage of the fact that Python has a built-in XML parser,
+# whereas doing the same check in Rust would require us to pull in an XML
+# crate just for this relatively-minor test.
+#
+# If you're trying to remove Python scripts from the test suite, think twice
+# before removing this one. You could do so, but it's probably not worth it.
+
 import sys
 import xml.etree.ElementTree as ET