]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virschematest: Improve testing schemas in 'tests/cputestdata'
authorPeter Krempa <pkrempa@redhat.com>
Thu, 8 Oct 2020 10:01:29 +0000 (12:01 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 3 Nov 2022 08:19:54 +0000 (09:19 +0100)
commit32d49d4b910179f7a57d5a1199b412798abef0f4
treeea42f263ef4b2929546efca5d3d44ae9ab19341f
parenta607baf65a66491d5bcbca1e3fa4e672a9ec8611
virschematest: Improve testing schemas in 'tests/cputestdata'

The 'cputestdata' directory has a collection of XML files with very
complicated naming schemes for various input and output XML files.

Rather than trying to write complex regexes for selecting specific files
which diverged already multiple times we can introduce an internal
schema file which will cover all of the 3 top level elements used in the
XML files.

Schema for <cpu> is taken from our main RNG schema, <cpuTest> is just a
collection of <cpu> elements, and finally <cpudata> is a simple enough
to describe inline.

To keep the validator happy we have to generate the schema file to
place full paths for the included documents.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/meson.build
tests/schemas/cpu-baseline.rng.in [new file with mode: 0644]
tests/schemas/meson.build [new file with mode: 0644]
tests/virschematest.c