summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/ptest-cargo.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* ptest-cargo.bbclass: add the possibility to define test argumentsFrederic Martinsons2023-05-101-2/+6
| | | | | | | | | | | | | | | | It can be useful for user of this class for giving common rust test arguments (like --shuffle, --format or --test-threads) To add arguments to test binary , simply define RUST_TEST_ARGS in your recipe that inherit ptest-cargo, for example: RUST_TEST_ARGS = "--shuffle" (From OE-Core rev: ea1feece62b0347aa2ebf02509ff2da151d96b61) 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>
* ptest-cargo.bbclass: create classFrederic Martinsons2023-05-051-0/+130
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. (From OE-Core rev: dad9bad239d757ae0b159fe5f1276b6856547b4c) 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>