Hi Anibal,

> Hi Anibal,
> 
> > Up till now ptest-runner2 returns number of failed tests with its
> > exit status code. Such use case is not recommended [1] and may cause
> > issues when there are more than 256 tests to be executed.
> > 
> > To alleviate this issue the number of total tests with number of
> > failed ones is printed before exit. To be more specific - failure of
> > tests (one or more) causes ptest-runner to provide exit code of 1.
> > 
> > One can test this change with executing:
> > ./ptest-runner -d tests/data fail  
> 
> Gentle ping on this patch.
> 

Gentle ping on this patch.

Is it OK to be applied?

> > 
> > Links:
> > [1] -
> > https://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
> > 
> > Signed-off-by: Lukasz Majewski <[email protected]>
> > ---
> > Changes for v2:
> > - When number of failed tests is N, the ptest-runner returns value
> > of 1 to indicate error in the execution
> > ---
> >  main.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/main.c b/main.c
> > index 890bc6a..bcec844 100644
> > --- a/main.c
> > +++ b/main.c
> > @@ -220,6 +220,9 @@ main(int argc, char *argv[])
> >             ptest_list_remove(run, opts.exclude[i], 1);
> >  
> >     rc = run_ptests(run, opts, argv[0], stdout, stderr);
> > +   fprintf(stdout, "TOTAL: %d FAIL: %d\n",
> > ptest_list_length(run), rc);
> > +   if (rc > 0)
> > +           rc = 1;
> >  
> >     ptest_list_free_all(&run);
> >    
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> [email protected]




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: [email protected]

Attachment: pgpCDv9dmg7p4.pgp
Description: OpenPGP digital signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#54769): https://lists.yoctoproject.org/g/yocto/message/54769
Mute This Topic: https://lists.yoctoproject.org/mt/84946492/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to