ci: exit setup on any error

Message ID 1565266937-8159-1-git-send-email-david.marchand@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series ci: exit setup on any error |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-Compile-Testing success Compile Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS

Commit Message

David Marchand Aug. 8, 2019, 12:22 p.m. UTC
  -e is preferrable so that we can catch errors in the middle of this
script.
An example is this Travis job [1] that should have errored at the meson
install step rather than go to the build step.

Adding debug mode as it can help post-mortem.

1: https://travis-ci.com/DPDK/dpdk/jobs/223511683

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 .ci/linux-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Santana Aug. 8, 2019, 1:07 p.m. UTC | #1
On Thu, Aug 8, 2019 at 8:22 AM David Marchand <david.marchand@redhat.com> wrote:
>
> -e is preferrable so that we can catch errors in the middle of this
> script.
> An example is this Travis job [1] that should have errored at the meson
> install step rather than go to the build step.
>
> Adding debug mode as it can help post-mortem.
>
> 1: https://travis-ci.com/DPDK/dpdk/jobs/223511683
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Michael Santana <msantana@redhat.com>
> ---
>  .ci/linux-setup.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh
> index a40e62e..dfb9d4a 100755
> --- a/.ci/linux-setup.sh
> +++ b/.ci/linux-setup.sh
> @@ -1,4 +1,4 @@
> -#!/bin/sh
> +#!/bin/sh -xe
>
>  # need to install as 'root' since some of the unit tests won't run without it
>  sudo python3 -m pip install --upgrade meson
> --
> 1.8.3.1
>
  
Aaron Conole Aug. 8, 2019, 2:30 p.m. UTC | #2
David Marchand <david.marchand@redhat.com> writes:

> -e is preferrable so that we can catch errors in the middle of this
> script.
> An example is this Travis job [1] that should have errored at the meson
> install step rather than go to the build step.
>
> Adding debug mode as it can help post-mortem.
>
> 1: https://travis-ci.com/DPDK/dpdk/jobs/223511683
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---

Good call.

Acked-by: Aaron Conole <aconole@redhat.com>
  
Thomas Monjalon Sept. 13, 2019, 11:19 a.m. UTC | #3
08/08/2019 16:30, Aaron Conole:
> David Marchand <david.marchand@redhat.com> writes:
> 
> > -e is preferrable so that we can catch errors in the middle of this
> > script.
> > An example is this Travis job [1] that should have errored at the meson
> > install step rather than go to the build step.
> >
> > Adding debug mode as it can help post-mortem.
> >
> > 1: https://travis-ci.com/DPDK/dpdk/jobs/223511683
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> 
> Good call.
> 
> Acked-by: Aaron Conole <aconole@redhat.com>

Applied, thanks
  

Patch

diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh
index a40e62e..dfb9d4a 100755
--- a/.ci/linux-setup.sh
+++ b/.ci/linux-setup.sh
@@ -1,4 +1,4 @@ 
-#!/bin/sh
+#!/bin/sh -xe
 
 # need to install as 'root' since some of the unit tests won't run without it
 sudo python3 -m pip install --upgrade meson