tests/qapi-schema: Add test of the rST QAPI doc-comment output
commitca1145ee88ee683c4db0aba83a4c91cdab3c3d6d
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 25 Sep 2020 16:23:10 +0000 (25 17:23 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 29 Sep 2020 15:55:39 +0000 (29 17:55 +0200)
tree026040107ae781358a80b5d01396545bb526b5a1
parentb3f4830ab398f6e66cda986835e9b5be567e3e49
tests/qapi-schema: Add test of the rST QAPI doc-comment output

Add a test of the rST output from the QAPI doc-comment generator,
similar to what we currently have that tests the Texinfo output.

This is a bit more awkward with Sphinx, because the generated output
is not 100% under our control the way the QAPI-to-Texinfo generator
was. We can't observe the data we generate, only the Sphinx
output. Two issues.

One, the output can vary with the Sphinx version. In practice Sphinx's
plaintext output generation has been identical between at least Sphinx
1.6 and 3.0, so we use that. (The HTML output has had changes across
versions). We use an exact-match comparison check, with the
understanding that perhaps changes in a future Sphinx version might
require us to implement something more clever to cope with variation
in the output.

Two, the test can only protect us from changes in the data we generate
that are visible in plain text.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200925162316.21205-16-peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message improved]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
tests/qapi-schema/doc-good.rst [new file with mode: 0644]
tests/qapi-schema/doc-good.txt [new file with mode: 0644]
tests/qapi-schema/meson.build