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

Message ID 20190409105539.61460-6-bruce.richardson@intel.com (mailing list archive)
State Rejected, 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, 10:55 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>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>

---
V2: change "==" to "=" in comparison
---
 devtools/test-meson-builds.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Thomas Monjalon April 17, 2019, 4:17 p.m. UTC | #1
09/04/2019 12:55, Bruce Richardson:
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> -set -o pipefail
> +# this option gives an error on BSD
> +if [ "`uname`" = "Linux" ] ; then
> +	set -o pipefail
> +fi

I think this is a bash option.
We may require bash at the top of this script as a workaround.
Or we can revert the inital patch piping to cat for verbose mode.
  
Bruce Richardson April 17, 2019, 4:30 p.m. UTC | #2
On Wed, Apr 17, 2019 at 06:17:06PM +0200, Thomas Monjalon wrote:
> 09/04/2019 12:55, Bruce Richardson:
> > --- a/devtools/test-meson-builds.sh
> > +++ b/devtools/test-meson-builds.sh
> > -set -o pipefail
> > +# this option gives an error on BSD
> > +if [ "`uname`" = "Linux" ] ; then
> > +	set -o pipefail
> > +fi
> 
> I think this is a bash option.
> We may require bash at the top of this script as a workaround.
> Or we can revert the inital patch piping to cat for verbose mode.
> 
Probably best to do the latter, I think. No real need to have two verbose
modes, just one. Let me see what I can do, if there may be any other
options.

/Bruce
  

Patch

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index b3b5cfbb5..dce9a3d89 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}