summaryrefslogtreecommitdiffstats
path: root/documentation/ref-manual
diff options
context:
space:
mode:
authorFrederic Martinsons <frederic.martinsons@gmail.com>2023-08-02 15:23:52 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-30 15:54:59 +0100
commit0537f6f4fc373e61c1d32fe1e4d7fa43ac54c93c (patch)
treef2a05ad7aefc624605a796e5bffef97b8e64e12d /documentation/ref-manual
parent8a11abf6a9dac76bf9739c44102a49984e3c2977 (diff)
downloadpoky-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.rst22
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.
266Using this class makes it very easy to build Rust programs. All you need 266Using this class makes it very easy to build Rust programs. All you need
267is to use the :term:`SRC_URI` variable to point to a source repository 267is to use the :term:`SRC_URI` variable to point to a source repository
268which can be built by Cargo, typically one that was created by the 268which 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``
270subdirectory. 270subdirectory.
271 271
272You will find a simple example in the 272If 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`.
274recipe. A more complex example, with package dependencies, is the 274
275You 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>`
277recipe. 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>`
276recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__ 279recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__
277tool. 280tool.
@@ -2517,6 +2520,17 @@ the class' functionality is largely disabled unless "ptest" appears in
2517section in the Yocto Project Development Tasks Manual for more information 2520section in the Yocto Project Development Tasks Manual for more information
2518on ptest. 2521on ptest.
2519 2522
2523.. _ref-classes-ptest-cargo:
2524
2525``ptest-cargo``
2526===============
2527
2528The :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
2531test 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``