From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 615A81B5DF for ; Fri, 19 Apr 2019 14:05:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2019 05:05:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,369,1549958400"; d="scan'208";a="224907498" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by orsmga001.jf.intel.com with ESMTP; 19 Apr 2019 05:05:00 -0700 From: Bruce Richardson To: thomas@monjalon.net Cc: dev@dpdk.org, David Marchand , Luca Boccassi , Bruce Richardson Date: Fri, 19 Apr 2019 13:04:49 +0100 Message-Id: <20190419120449.29883-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] devtools/test-meson-builds: fix support for plain bourne shell X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2019 12:05:03 -0000 The pipefail option is not supported in /bin/sh, just in bash/ksh and similar shells - which means it's there by default on most Linux distros but not on e.g. FreeBSD. Therefore we check for it's presence before setting the option, and if it's missing, we upgrade verbosity level if needed to ensure we never hide any build failures. Signed-off-by: Bruce Richardson --- This patch is a replacement for the previous patch: "fix support for FreeBSD" [1], which was an incorrect/incomplete fix. [1]http://patches.dpdk.org/patch/52468/ --- devtools/test-meson-builds.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 0ea79f461..630a1a6fe 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -7,7 +7,9 @@ # * if a build-directory already exists we assume it was properly configured # Run ninja after configuration is done. -set -o pipefail +# set pipefail option if possible +PIPEFAIL="" +set -o | grep -q pipefail && set -o pipefail && PIPEFAIL=1 srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} @@ -51,6 +53,11 @@ if [ "$1" = "-vv" ] ; then elif [ "$1" = "-v" ] ; then TEST_MESON_BUILD_VERBOSE=1 fi +# we can't use plain verbose when we don't have pipefail option so up-level +if [ -z "$PIPEFAIL" -a -n "$TEST_MESON_BUILD_VERBOSE" ] ; then + echo "# Missing pipefail shell option, changing VERBOSE to VERY_VERBOSE" + TEST_MESON_BUILD_VERY_VERBOSE=1 +fi # shared and static linked builds with gcc and clang for c in gcc clang ; do -- 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 404AAA00E6 for ; Fri, 19 Apr 2019 14:05:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 21BCF1B5FD; Fri, 19 Apr 2019 14:05:04 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 615A81B5DF for ; Fri, 19 Apr 2019 14:05:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2019 05:05:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,369,1549958400"; d="scan'208";a="224907498" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by orsmga001.jf.intel.com with ESMTP; 19 Apr 2019 05:05:00 -0700 From: Bruce Richardson To: thomas@monjalon.net Cc: dev@dpdk.org, David Marchand , Luca Boccassi , Bruce Richardson Date: Fri, 19 Apr 2019 13:04:49 +0100 Message-Id: <20190419120449.29883-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] devtools/test-meson-builds: fix support for plain bourne shell X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190419120449.C6aAjs3KqqByqkqYhTZTB_EIvF1x7BZa35E63HIQ1cE@z> The pipefail option is not supported in /bin/sh, just in bash/ksh and similar shells - which means it's there by default on most Linux distros but not on e.g. FreeBSD. Therefore we check for it's presence before setting the option, and if it's missing, we upgrade verbosity level if needed to ensure we never hide any build failures. Signed-off-by: Bruce Richardson --- This patch is a replacement for the previous patch: "fix support for FreeBSD" [1], which was an incorrect/incomplete fix. [1]http://patches.dpdk.org/patch/52468/ --- devtools/test-meson-builds.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 0ea79f461..630a1a6fe 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -7,7 +7,9 @@ # * if a build-directory already exists we assume it was properly configured # Run ninja after configuration is done. -set -o pipefail +# set pipefail option if possible +PIPEFAIL="" +set -o | grep -q pipefail && set -o pipefail && PIPEFAIL=1 srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} @@ -51,6 +53,11 @@ if [ "$1" = "-vv" ] ; then elif [ "$1" = "-v" ] ; then TEST_MESON_BUILD_VERBOSE=1 fi +# we can't use plain verbose when we don't have pipefail option so up-level +if [ -z "$PIPEFAIL" -a -n "$TEST_MESON_BUILD_VERBOSE" ] ; then + echo "# Missing pipefail shell option, changing VERBOSE to VERY_VERBOSE" + TEST_MESON_BUILD_VERY_VERBOSE=1 +fi # shared and static linked builds with gcc and clang for c in gcc clang ; do -- 2.20.1