All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] travis: Correct error checking when building boards
@ 2020-04-16  3:06 Simon Glass
  2020-04-16  6:31 ` Michal Simek
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2020-04-16  3:06 UTC (permalink / raw)
  To: u-boot

At present if buildman reports an error, the travis build still succeeds.

This is because the travis script does not stop when it sees errors; nor
does it automatically return the exit code. Also the current error
checking never triggers since 'ret' is not set.

Fix this by setting 'ret' correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index b3253da13c3..e5b2b5e335e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -208,7 +208,7 @@ script:
  #
  # Build a selection of boards if TEST_PY_BD is empty
  - if [[ "${BUILDMAN}" != "" ]]; then
-     tools/buildman/buildman -P -E -W ${BUILDMAN} ${OVERRIDE};
+     tools/buildman/buildman -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?;
      if [[ $ret -ne 0 ]]; then
        tools/buildman/buildman -seP ${BUILDMAN};
        exit $ret;
-- 
2.26.0.110.g2183baf09c-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] travis: Correct error checking when building boards
  2020-04-16  3:06 [PATCH] travis: Correct error checking when building boards Simon Glass
@ 2020-04-16  6:31 ` Michal Simek
  2020-04-19 23:37   ` Simon Glass
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2020-04-16  6:31 UTC (permalink / raw)
  To: u-boot

On 16. 04. 20 5:06, Simon Glass wrote:
> At present if buildman reports an error, the travis build still succeeds.
> 
> This is because the travis script does not stop when it sees errors; nor
> does it automatically return the exit code. Also the current error
> checking never triggers since 'ret' is not set.
> 
> Fix this by setting 'ret' correctly.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  .travis.yml | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.travis.yml b/.travis.yml
> index b3253da13c3..e5b2b5e335e 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -208,7 +208,7 @@ script:
>   #
>   # Build a selection of boards if TEST_PY_BD is empty
>   - if [[ "${BUILDMAN}" != "" ]]; then
> -     tools/buildman/buildman -P -E -W ${BUILDMAN} ${OVERRIDE};
> +     tools/buildman/buildman -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?;
>       if [[ $ret -ne 0 ]]; then
>         tools/buildman/buildman -seP ${BUILDMAN};
>         exit $ret;
> 

I am also missing ret=0; assignment which is also needed.

Please also add
Reported-by: Michal Simek <michal.simek@xilinx.com>
to v2.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] travis: Correct error checking when building boards
  2020-04-16  6:31 ` Michal Simek
@ 2020-04-19 23:37   ` Simon Glass
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-04-19 23:37 UTC (permalink / raw)
  To: u-boot

Hi Michal,

On Thu, 16 Apr 2020 at 00:31, Michal Simek <michal.simek@xilinx.com> wrote:
>
> On 16. 04. 20 5:06, Simon Glass wrote:
> > At present if buildman reports an error, the travis build still succeeds.
> >
> > This is because the travis script does not stop when it sees errors; nor
> > does it automatically return the exit code. Also the current error
> > checking never triggers since 'ret' is not set.
> >
> > Fix this by setting 'ret' correctly.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  .travis.yml | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/.travis.yml b/.travis.yml
> > index b3253da13c3..e5b2b5e335e 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -208,7 +208,7 @@ script:
> >   #
> >   # Build a selection of boards if TEST_PY_BD is empty
> >   - if [[ "${BUILDMAN}" != "" ]]; then
> > -     tools/buildman/buildman -P -E -W ${BUILDMAN} ${OVERRIDE};
> > +     tools/buildman/buildman -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?;
> >       if [[ $ret -ne 0 ]]; then
> >         tools/buildman/buildman -seP ${BUILDMAN};
> >         exit $ret;
> >
>
> I am also missing ret=0; assignment which is also needed.

Are you sure this is needed? It seems to work without it. By default
variables are empty in bash.

But I will change it, since it is confusing otherwise.

>
> Please also add
> Reported-by: Michal Simek <michal.simek@xilinx.com>
> to v2.

OK will do.


- Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-19 23:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16  3:06 [PATCH] travis: Correct error checking when building boards Simon Glass
2020-04-16  6:31 ` Michal Simek
2020-04-19 23:37   ` Simon Glass

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.