]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
ptest-cargo.bbclass: create class
authorFrederic Martinsons <frederic.martinsons@gmail.com>
Thu, 27 Apr 2023 15:12:48 +0000 (17:12 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 5 May 2023 09:57:35 +0000 (10:57 +0100)
commitdad9bad239d757ae0b159fe5f1276b6856547b4c
treeee3d15487973566cd3051d9d3c566ca792574df5
parentd5ce88c15183c2bf887543c8c31e9c31aaa56a1a
ptest-cargo.bbclass: create class

This new class offers the possibility to build rust unit tests
(and integration tests) and find them correctly.
Due to non deterministic names of generated binaries, a custom
parsing of build result must be performed.
See https://github.com/rust-lang/cargo/issues/1924

All rust projects will generate a test binary with "cargo build --tests"
command, even if there are no test defined in source code.
The binary will just output that it ran 0 tests.

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/ptest-cargo.bbclass [new file with mode: 0644]