diff mbox series

[PATCHv4] test-manual/ptest: Add info about fail state of ptest-runner/ptests

Message ID 20250611184034.566623-1-anibal@limonsoftware.com
State Superseded
Headers show
Series [PATCHv4] test-manual/ptest: Add info about fail state of ptest-runner/ptests | expand

Commit Message

Anibal Limon June 11, 2025, 6:40 p.m. UTC
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(-)

Comments

Antonin Godard June 17, 2025, 12:20 p.m. UTC | #1
Hi,

On Wed Jun 11, 2025 at 8:40 PM 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..9442387f7 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 total and failed

s/keeps counter of/keeps count of/

> +``ptests``, At end the execution summary is written to the console. If

Should be a "." not "," after ``ptests``.

> +any of the ``run-ptest`` fails returns '1'.

Missing a word?

s/``run-ptest`` fails returns '1'/``run-ptest``, ``ptest-runner`` returns '1'/

> +
> +Consequently, you might want to add this package to your image.

I would suggest:

"Consequently, you might want to add ``ptest-runner`` to your image."

So users know they can add the package "ptest-runner" in IMAGE_INSTALL directly.

> +
>  
>  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 ``run-ptest`` exit with 0 to mark it

s/exit/exits/

> +   as sucessfully executed otherwise will be marked as fail.

Sorry, I corrected your typo with a typo the first time. It's actually:

s/sucessfully/successfully/

> +   Here is an example that starts a test for ``dbus``::
>  
>        #!/bin/sh
>        cd test

Thanks,
Antonin
Anibal Limon June 19, 2025, 4:09 p.m. UTC | #2
Hi Antonin,

Thanks for the corrections, sending the next PATCH version.

Cheers!,
Anibal

On Tue, Jun 17, 2025 at 6:20 AM Antonin Godard <antonin.godard@bootlin.com>
wrote:

> Hi,
>
> On Wed Jun 11, 2025 at 8:40 PM 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..9442387f7 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 total and failed
>
> s/keeps counter of/keeps count of/
>
> > +``ptests``, At end the execution summary is written to the console. If
>
> Should be a "." not "," after ``ptests``.
>
> > +any of the ``run-ptest`` fails returns '1'.
>
> Missing a word?
>
> s/``run-ptest`` fails returns '1'/``run-ptest``, ``ptest-runner`` returns
> '1'/
>
> > +
> > +Consequently, you might want to add this package to your image.
>
> I would suggest:
>
> "Consequently, you might want to add ``ptest-runner`` to your image."
>
> So users know they can add the package "ptest-runner" in IMAGE_INSTALL
> directly.
>
> > +
> >
> >  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 ``run-ptest`` exit with 0 to mark it
>
> s/exit/exits/
>
> > +   as sucessfully executed otherwise will be marked as fail.
>
> Sorry, I corrected your typo with a typo the first time. It's actually:
>
> s/sucessfully/successfully/
>
> > +   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
>
>
diff mbox series

Patch

diff --git a/documentation/test-manual/ptest.rst b/documentation/test-manual/ptest.rst
index 2c021af51..9442387f7 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 total and failed
+``ptests``, At end the execution summary is written to the console. If
+any of the ``run-ptest`` fails returns '1'.
+
+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 ``run-ptest`` exit with 0 to mark it
+   as sucessfully executed otherwise will be marked as fail.
+   Here is an example that starts a test for ``dbus``::
 
       #!/bin/sh
       cd test