From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 51EC4A04DB; Tue, 17 Nov 2020 11:38:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F64958C4; Tue, 17 Nov 2020 11:38:36 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by dpdk.org (Postfix) with ESMTP id A2B95567C for ; Tue, 17 Nov 2020 11:38:34 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 849BFF82; Tue, 17 Nov 2020 05:38:32 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 17 Nov 2020 05:38:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=Dsu51URfkKX/U Xlv5bAwr/f6ZDsbRrea6y5MGFTdVLM=; b=C23VPkTKjk2QO1mHNY9pEJgl3309F awevOLQU4VpmgZZ+Y9K7xg9xo6HTCS2zIAneOvZaH9jkZ8N+cIFLUU8XZPJGgdmn 1QTbiWDMOHIRc70n0wwee9Bg5zPN9tZrEVL6+CSpCXBIkSRg3QOuDDjrGp50uGvR Y89f29oqT7ebAf29alSfKx69TgqeQGRvWb6y7kANj9CrneP/AUrkfqxEXhwhb0w6 qwlIsz0SedT4FyLw5TS7ocz50AcgajrnpwpaZux2HahucvfGHKMh0f1Vu5EyseTs cm6ZXGZUAa409sWHpNNt5MWr70l6zVqAzMVhXUgerRC/n9dEP+SGXNbmg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=Dsu51URfkKX/UXlv5bAwr/f6ZDsbRrea6y5MGFTdVLM=; b=BWpdptan 26HKMBP5urznXVoY/ygUoXWuiPJaBBjPUlYQ7fB0YFk9Di987//wACR017EnMzlb wbhUVZ6TVpjQ6GpnkGj5Rwjpr5QPUn4/7ffcP2xLm7eNWtSo2acpliPZZ3vykEfq Tp1Dx79V5MS0HrnD9qkgnfKP0iuxN5E6mEynu4KVpbIhuKfoYjKS1swP6spFyJ3e d87A7itUzqG3+DKfu3JJj7QK/T78TC2U7VdGIDXl7FjgOL5KvUY9t4P8oFY9YKix vRKqHy9VdSY8UTKxGjhvjITj+zQLTCB/yEzgBQwYEGtEtxRSX8sBr16l6Fc4UteV HGSeSalga8imHg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeffedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpedvhefgiedvjeegtdevhe efhfetleefgfeivefgffevfeejgedtgfeutdehtdegveenucfkphepjeejrddufeegrddv tdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 052043064AB0; Tue, 17 Nov 2020 05:38:30 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com Date: Tue, 17 Nov 2020 11:38:26 +0100 Message-Id: <20201117103826.585604-1-thomas@monjalon.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201112163901.1728959-1-thomas@monjalon.net> References: <20201112163901.1728959-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/1] devtools: rename build test verbosity variables 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" The verbosity was meant to be set with options -v and -vv, or possibly with the environment variables TEST_MESON_BUILD_VERBOSE and TEST_MESON_BUILD_VERY_VERBOSE. It is decided to keep only the options -v and -vv, so the variables are renamed with lower case, marking them as privates. The handling of the verbosity level is also moved upper in the script, closer to other initializations. Signed-off-by: Thomas Monjalon --- v2: make the variables private to the script --- devtools/test-meson-builds.sh | 38 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 3ce49368cf..7280b7a93d 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -43,6 +43,24 @@ default_cflags=$CFLAGS default_ldflags=$LDFLAGS default_meson_options=$DPDK_MESON_OPTIONS +opt_verbose= +opt_vverbose= +if [ "$1" = "-v" ] ; then + opt_verbose=y +elif [ "$1" = "-vv" ] ; then + opt_verbose=y + opt_vverbose=y +fi +# we can't use plain verbose when we don't have pipefail option so up-level +if [ -z "$PIPEFAIL" -a -n "$opt_verbose" ] ; then + echo "# Missing pipefail shell option, changing VERBOSE to VERY_VERBOSE" + opt_vverbose=y +fi +[ -n "$opt_verbose" ] && exec 8>&1 || exec 8>/dev/null +verbose=8 +[ -n "$opt_vverbose" ] && exec 9>&1 || exec 9>/dev/null +veryverbose=9 + check_cc_flags () # ... { echo 'int main(void) { return 0; }' | @@ -108,11 +126,11 @@ config () # compile () # { builddir=$1 - if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] ; then + if [ -n "$opt_vverbose" ] ; then # for full output from ninja use "-v" echo "$ninja_cmd -v -C $builddir" $ninja_cmd -v -C $builddir - elif [ -n "$TEST_MESON_BUILD_VERBOSE" ] ; then + elif [ -n "$opt_verbose" ] ; then # for keeping the history of short cmds, pipe through cat echo "$ninja_cmd -C $builddir | cat" $ninja_cmd -C $builddir | cat @@ -180,22 +198,6 @@ build () # fi } -if [ "$1" = "-vv" ] ; then - TEST_MESON_BUILD_VERY_VERBOSE=1 - TEST_MESON_BUILD_VERBOSE=1 -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 -[ -n "$TEST_MESON_BUILD_VERBOSE" ] && exec 8>&1 || exec 8>/dev/null -verbose=8 -[ -n "$TEST_MESON_BUILD_VERY_VERBOSE" ] && exec 9>&1 || exec 9>/dev/null -veryverbose=9 - # shared and static linked builds with gcc and clang for c in gcc clang ; do command -v $c >/dev/null 2>&1 || continue -- 2.28.0