diff mbox series

[U-Boot,3/4] travis.yml: fix 'set +e' in build script

Message ID 20180125172127.17825-4-daniel.schwierzeck@gmail.com
State Superseded
Delegated to: Tom Rini
Headers show
Series Add support for treating compiler warnings as errors | expand

Commit Message

Daniel Schwierzeck Jan. 25, 2018, 5:21 p.m. UTC
The build script should not manipulate shell flags (especially '-e').
A non-zero exit value can also be catched with 'cmd || ret=$?'.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
---

 .travis.yml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Simon Glass Feb. 4, 2018, 1:39 p.m. UTC | #1
On 25 January 2018 at 10:21, Daniel Schwierzeck
<daniel.schwierzeck@gmail.com> wrote:
> The build script should not manipulate shell flags (especially '-e').
> A non-zero exit value can also be catched with 'cmd || ret=$?'.
>
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> ---
>
>  .travis.yml | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 2a98c4bb11..1e55e1b7f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -101,9 +101,8 @@  script:
  #
  # Exit code 129 means warnings only.
  - if [[ "${BUILDMAN}" != "" ]]; then
-     set +e;
-     tools/buildman/buildman -P ${BUILDMAN};
-     ret=$?;
+     ret=0;
+     tools/buildman/buildman -P ${BUILDMAN} || ret=$?;
      if [[ $ret -ne 0 && $ret -ne 129 ]]; then
        tools/buildman/buildman -sdeP ${BUILDMAN};
        exit $ret;