diff mbox series

[v2] test-manual: add more detail to the ptest section

Message ID 5f3560bb-bb16-89ed-9b39-4a126b7a64b2@crashcourse.ca
State New
Headers show
Series [v2] test-manual: add more detail to the ptest section | expand

Commit Message

Robert P. J. Day June 16, 2026, 4:05 p.m. UTC
Expand the ptest section to show how to distinguish between adding all
ptest packages to an image versus adding only a selected set of
packages to the image.

Also mention using "oe-pkgdata-util" to list all ptest packages
generated by the build.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>

---
diff mbox series

Patch

diff --git a/documentation/test-manual/ptest.rst b/documentation/test-manual/ptest.rst
index 1c946f81d..62eb137d2 100644
--- a/documentation/test-manual/ptest.rst
+++ b/documentation/test-manual/ptest.rst
@@ -31,17 +31,46 @@  see the :yocto_wiki:`Ptest </Ptest>` wiki page.
 Adding ptest to Your Build
 ==========================

-To add package testing to your build, add the :term:`DISTRO_FEATURES` and
-:term:`EXTRA_IMAGE_FEATURES` variables to your ``local.conf`` file, which
-is found in the :term:`Build Directory`::
+Adding package testing to your image is done in two steps:
+
+#. Select that all ptest packages should be built and packaged, and
+
+#. Identify which of those ptest packages to add to your image.
+
+First, in order to build all ptest packages, add the following line
+to a :term:`configuration file`::

    DISTRO_FEATURES:append = " ptest"
-   EXTRA_IMAGE_FEATURES += "ptest-pkgs"
+
+Note that this will cause all ptest packages to be built and packaged,
+but will not add any of those packages to your image; that comes in
+the next step. You can then add ptest packages to your image in one of two ways.
+
+#. If you want to add *all* of the generated ptest packages, add the line::
+
+      EXTRA_IMAGE_FEATURES += "ptest-pkgs"
+
+#. On the other hand, if you want to add only a select few of the ptest
+   packages, you can use some variation of::
+
+      IMAGE_INSTALL:append = " e2fsprogs-ptest zlib-ptest"

 Once your build is complete, the ptest files are installed into the
 ``/usr/lib/package/ptest`` directory within the image, where ``package``
 is the name of the package.

+.. note::
+
+   If you want to list all ptest packages generated by your
+   build that *could* be installed in your image (not just the ones
+   you select), you can use the ``oe-pkgdata-util`` command::
+
+      $ oe-pkgdata-util list-pkgs "*-ptest"
+      acl-ptest
+      attr-ptest
+      bash-ptest
+      ... etc etc ...
+
 Running ptest
 =============