summaryrefslogtreecommitdiff
path: root/tests/fate
diff options
context:
space:
mode:
authorTobias Rapp <t.rapp@noa-archive.com>2021-04-16 10:46:41 +0200
committerTobias Rapp <t.rapp@noa-archive.com>2021-07-13 08:57:23 +0200
commitf531a1a4e8f5bbc66d6077efe3b4f90f76cc5f51 (patch)
tree5cca7c6c74a97492a5235128aff8e18ed657258c /tests/fate
parent9b4b0df47009ebc3d26bf3f1b1eff668fd028cc6 (diff)
fate/ffprobe: Verify ffprobe XML output against schema file
Adds schema validation for ffprobe XML output so that updating the ffprobe.xsd file upon changes to ffprobe is not forgotten. This was suggested by Marton Balint in: http://ffmpeg.org/pipermail/ffmpeg-devel/2021-March/278428.html The schema FATE test is only run if xmllint command is available. Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Diffstat (limited to 'tests/fate')
-rw-r--r--tests/fate/ffprobe.mak6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/fate/ffprobe.mak b/tests/fate/ffprobe.mak
index c867bebf41..d2abe8a11e 100644
--- a/tests/fate/ffprobe.mak
+++ b/tests/fate/ffprobe.mak
@@ -29,6 +29,12 @@ FATE_FFPROBE-$(CONFIG_AVDEVICE) += fate-ffprobe_xml
fate-ffprobe_xml: $(FFPROBE_TEST_FILE)
fate-ffprobe_xml: CMD = run $(FFPROBE_COMMAND) -of xml
+FATE_FFPROBE_SCHEMA-$(CONFIG_AVDEVICE) += fate-ffprobe_xsd
+fate-ffprobe_xsd: $(FFPROBE_TEST_FILE)
+fate-ffprobe_xsd: CMD = run $(FFPROBE_COMMAND) -noprivate -of xml=q=1:x=1 | \
+ xmllint --schema $(SRC_PATH)/doc/ffprobe.xsd -
+
+FATE_FFPROBE-$(HAVE_XMLLINT) += $(FATE_FFPROBE_SCHEMA-yes)
FATE_FFPROBE += $(FATE_FFPROBE-yes)
fate-ffprobe: $(FATE_FFPROBE)