Skip to content

Commit

Permalink
Advise against removing run-make/libtest-junit/validate_junit.py
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Zalathar committed Aug 22, 2024
1 parent 5fc562c commit 34cdfc9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/run-make/libtest-junit/validate_junit.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 34cdfc9

Please sign in to comment.