diff options
author | Frederic Martinsons <frederic.martinsons@gmail.com> | 2023-08-02 15:23:52 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-08-30 15:54:59 +0100 |
commit | 0537f6f4fc373e61c1d32fe1e4d7fa43ac54c93c (patch) | |
tree | f2a05ad7aefc624605a796e5bffef97b8e64e12d /documentation/ref-manual | |
parent | 8a11abf6a9dac76bf9739c44102a49984e3c2977 (diff) | |
download | poky-0537f6f4fc373e61c1d32fe1e4d7fa43ac54c93c.tar.gz |
ref-manual: classes.rst: suppress rust-hello-world reference, add ptest-cargo class
(From yocto-docs rev: 8b1f41ebef4e02d9b0d50ce7e69cb90c83eb4324)
Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/ref-manual')
-rw-r--r-- | documentation/ref-manual/classes.rst | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index a7819d5b60..973070dfb1 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst | |||
@@ -266,12 +266,15 @@ manager, allowing to fetch package dependencies and build your program. | |||
266 | Using this class makes it very easy to build Rust programs. All you need | 266 | Using this class makes it very easy to build Rust programs. All you need |
267 | is to use the :term:`SRC_URI` variable to point to a source repository | 267 | is to use the :term:`SRC_URI` variable to point to a source repository |
268 | which can be built by Cargo, typically one that was created by the | 268 | which can be built by Cargo, typically one that was created by the |
269 | ``cargo new`` command, containing a ``Cargo.toml`` file and a ``src`` | 269 | ``cargo new`` command, containing a ``Cargo.toml`` file, a ``Cargo.lock`` file and a ``src`` |
270 | subdirectory. | 270 | subdirectory. |
271 | 271 | ||
272 | You will find a simple example in the | 272 | If you want to build and package tests of the program, inherit the |
273 | :oe_git:`rust-hello-world_git.bb </openembedded-core/tree/meta/recipes-extended/rust-example/rust-hello-world_git.bb>` | 273 | :ref:`ref-classes-ptest-cargo` class instead of :ref:`ref-classes-cargo`. |
274 | recipe. A more complex example, with package dependencies, is the | 274 | |
275 | You will find an example (that show also how to handle possible git source dependencies) in the | ||
276 | :oe_git:`zvariant_3.12.0.bb </openembedded-core/tree/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb>` | ||
277 | recipe. Another example, with only crate dependencies, is the | ||
275 | :oe_git:`uutils-coreutils </meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils>` | 278 | :oe_git:`uutils-coreutils </meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils>` |
276 | recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__ | 279 | recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__ |
277 | tool. | 280 | tool. |
@@ -2517,6 +2520,17 @@ the class' functionality is largely disabled unless "ptest" appears in | |||
2517 | section in the Yocto Project Development Tasks Manual for more information | 2520 | section in the Yocto Project Development Tasks Manual for more information |
2518 | on ptest. | 2521 | on ptest. |
2519 | 2522 | ||
2523 | .. _ref-classes-ptest-cargo: | ||
2524 | |||
2525 | ``ptest-cargo`` | ||
2526 | =============== | ||
2527 | |||
2528 | The :ref:`ref-classes-ptest-cargo` class is a class which extends the | ||
2529 | :ref:`ref-classes-cargo` class and adds ``compile_ptest_cargo`` and | ||
2530 | ``install_ptest_cargo`` steps to respectively build and install | ||
2531 | test suites defined in the ``Cargo.toml`` file, into a dedicated | ||
2532 | ``-ptest`` package. | ||
2533 | |||
2520 | .. _ref-classes-ptest-gnome: | 2534 | .. _ref-classes-ptest-gnome: |
2521 | 2535 | ||
2522 | ``ptest-gnome`` | 2536 | ``ptest-gnome`` |