[5/5] devtools/test-meson-builds: fix support for FreeBSD

Message ID 20190409092933.55356-6-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series small cleanup and fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson April 9, 2019, 9:29 a.m. UTC
  The pipefile option does not seem to exist on FreeBSD, giving an error
when running the script.

Fixes: 5d9176673008 ("devtools: fix meson build test to exit on failure")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

David Marchand April 9, 2019, 9:57 a.m. UTC | #1
On Tue, Apr 9, 2019 at 11:30 AM Bruce Richardson <bruce.richardson@intel.com>
wrote:

> The pipefile option does not seem to exist on FreeBSD, giving an error
> when running the script.
>
> Fixes: 5d9176673008 ("devtools: fix meson build test to exit on failure")
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  devtools/test-meson-builds.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
> index b3b5cfbb5..1fd23fac7 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -7,7 +7,10 @@
>  # * if a build-directory already exists we assume it was properly
> configured
>  # Run ninja after configuration is done.
>
> -set -o pipefail
> +# this option gives an error on BSD
> +if [ "`uname`" == "Linux" ] ; then
> +       set -o pipefail
> +fi
>

== is a bashism, can't you just use = ?
  
Bruce Richardson April 9, 2019, 10:02 a.m. UTC | #2
On Tue, Apr 09, 2019 at 11:57:04AM +0200, David Marchand wrote:
>    On Tue, Apr 9, 2019 at 11:30 AM Bruce Richardson
>    <[1]bruce.richardson@intel.com> wrote:
> 
>      The pipefile option does not seem to exist on FreeBSD, giving an
>      error
>      when running the script.
>      Fixes: 5d9176673008 ("devtools: fix meson build test to exit on
>      failure")
>      Signed-off-by: Bruce Richardson <[2]bruce.richardson@intel.com>
>      ---
>       devtools/test-meson-builds.sh | 5 ++++-
>       1 file changed, 4 insertions(+), 1 deletion(-)
>      diff --git a/devtools/test-meson-builds.sh
>      b/devtools/test-meson-builds.sh
>      index b3b5cfbb5..1fd23fac7 100755
>      --- a/devtools/test-meson-builds.sh
>      +++ b/devtools/test-meson-builds.sh
>      @@ -7,7 +7,10 @@
>       # * if a build-directory already exists we assume it was properly
>      configured
>       # Run ninja after configuration is done.
>      -set -o pipefail
>      +# this option gives an error on BSD
>      +if [ "`uname`" == "Linux" ] ; then
>      +       set -o pipefail
>      +fi
> 
>    == is a bashism, can't you just use = ?
>    --
Yes, my bad, I'll do a v2.

/Bruce
  
Luca Boccassi April 9, 2019, 10:37 a.m. UTC | #3
On Tue, 2019-04-09 at 10:29 +0100, Bruce Richardson wrote:
> The pipefile option does not seem to exist on FreeBSD, giving an
> error
> when running the script.
> 
> Fixes: 5d9176673008 ("devtools: fix meson build test to exit on
> failure")
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  devtools/test-meson-builds.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-
> builds.sh
> index b3b5cfbb5..1fd23fac7 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -7,7 +7,10 @@
>  # * if a build-directory already exists we assume it was properly
> configured
>  # Run ninja after configuration is done.
>  
> -set -o pipefail
> +# this option gives an error on BSD
> +if [ "`uname`" == "Linux" ] ; then
> +	set -o pipefail
> +fi
>  
>  srcdir=$(dirname $(readlink -f $0))/..
>  MESON=${MESON:-meson}

With the == fix:

Acked-by: Luca Boccassi <bluca@debian.org>
  

Patch

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index b3b5cfbb5..1fd23fac7 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -7,7 +7,10 @@ 
 # * if a build-directory already exists we assume it was properly configured
 # Run ninja after configuration is done.
 
-set -o pipefail
+# this option gives an error on BSD
+if [ "`uname`" == "Linux" ] ; then
+	set -o pipefail
+fi
 
 srcdir=$(dirname $(readlink -f $0))/..
 MESON=${MESON:-meson}