From: "Antonin Godard" <antonin.godard@bootlin.com>
To: "Anibal Limon" <anibal@limonsoftware.com>, <docs@lists.yoctoproject.org>
Cc: <erik.schumacher@iris-sensing.com>, <yoann.congal@smile.fr>
Subject: Re: [PATCHv2] test-manual/ptest: Add info about fail state of ptest-runner/ptests
Date: Tue, 10 Jun 2025 17:31:38 +0200 [thread overview]
Message-ID: <DAIYMJTVXDR1.TL3CNDVDAHHL@bootlin.com> (raw)
In-Reply-To: <20250610015125.4276-1-anibal@limonsoftware.com>
On Tue Jun 10, 2025 at 3:51 AM CEST, Anibal Limon wrote:
> On the ML was pointed about no specific information about
> ptest-runner/ptests so improve docs around.
>
> https://lists.yoctoproject.org/g/yocto-patches/message/1622
>
> [YOCTO #15832]
>
> Signed-off-by: Anibal Limon <anibal@limonsoftware.com>
> ---
> documentation/test-manual/ptest.rst | 17 ++++++++++++-----
> 1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/documentation/test-manual/ptest.rst b/documentation/test-manual/ptest.rst
> index 2c021af51..d01735c08 100644
> --- a/documentation/test-manual/ptest.rst
> +++ b/documentation/test-manual/ptest.rst
> @@ -46,13 +46,19 @@ Running ptest
> =============
>
> The ``ptest-runner`` package installs a shell script that loops through
> -all installed ptest test suites and runs them in sequence. Consequently,
> -you might want to add this package to your image.
> +all installed ptest test suites and runs them in sequence.
> +
> +During the execution ``ptest-runner`` keeps counter of failed ``ptests``
> +and use it as exit value, failing the execution if any of the ``run-ptest``
> +scripts fails.
> +
> +Consequently, you might want to add this package to your image.
> +
>
> Getting Your Package Ready
> ==========================
>
> -In order to enable a recipe to run installed ptests on target hardware,
> +In order to enable a recipe to run installed ``ptests`` on target hardware,
> you need to prepare the recipes that build the packages you want to
> test. Here is what you have to do for each recipe:
>
> @@ -77,8 +83,9 @@ test. Here is what you have to do for each recipe:
>
> - *Create run-ptest:* This script starts your test. Locate the
> script where you will refer to it using
> - :term:`SRC_URI`. Here is an
> - example that starts a test for ``dbus``::
> + :term:`SRC_URI`. Be sure your ``run-ptest`` exit with 0 to mark it
I think Yoann suggested that the run-ptest script should return 1 in case of
failure. Can you also mention that? We need to be clear that the run-ptest
script must return a static code and not any non-zero code, as it could clash
with ptest-runner's own exit code (e.g. 127), if I understood correctly.
> + as succesfully executed.
s/succesfully/sucessfully/
> + Here is an example that starts a test for ``dbus``::
>
> #!/bin/sh
> cd test
Thanks,
Antonin
--
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-06-10 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-10 1:51 [PATCHv2] test-manual/ptest: Add info about fail state of ptest-runner/ptests Anibal Limon
2025-06-10 15:31 ` Antonin Godard [this message]
2025-06-11 1:54 ` Anibal Limon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DAIYMJTVXDR1.TL3CNDVDAHHL@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=anibal@limonsoftware.com \
--cc=docs@lists.yoctoproject.org \
--cc=erik.schumacher@iris-sensing.com \
--cc=yoann.congal@smile.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.