]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
librsvg: add ptest support
authorGyorgy Sarvari <skandigraun@gmail.com>
Thu, 4 Sep 2025 11:21:40 +0000 (13:21 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Sep 2025 09:45:09 +0000 (10:45 +0100)
commit3aee16beac9b12403babfc7eef02be71b2297e70
tree196c70373ce095187cf270d2794939738c5cff19
parent049ce8ad241bae31c22b83788e732080f7d04526
librsvg: add ptest support

The suite is quick, it takes ~5 seconds on my machine to execute.

The tests consist of 2 or 3 parts, depending on how one counts them.

The apitest PACKAGACONFIG compiles tests for the c-interface, as part of
the main meson build. This apitest expects test data to be present in
a folder relative the test binary: ../../rsvg/tests folder.

ptest-cargo compiles two sets of test: rsvg-convert tests, and generic assorted
tests for the library, in multiple binaries.

The rsvg-convert tests expect test data to be present in a "tests" folder,
in the same folder where the test binaries are.

The library tests expect the tests to be in a folder called "tests", that's
location is specified by the CARGO_MANIFEST_DIR environment variable.

As part of compiling the cargo tests, rsvg-convert is also compiled specifically
for the tests, however it is not supposed to be different from the actual binary.
It is deleted from the test set, because of two reasons:
1. It is not bit-identical to the actually installed rsvg-convert (it is compiled differently,
   with cargo only, without meson)
2. ptest-cargo class treated it as a test binary, and tried to execute it, which resulted
   in failing/hanging test.

It is avoided by not installing this binary, but rather use the real rsvg package
as a runtime dependency, and create a symlink to it in the run-ptest script.

Added liberation-fonts as a runtime dependency to the tests - the rsvg-convert
tests require some fonts to be available to be able to render during some
svg->pdf conversion tests.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-gnome/librsvg/librsvg/run-ptest [new file with mode: 0644]
meta/recipes-gnome/librsvg/librsvg_2.61.0.bb