From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 92C17A09D3;
	Thu, 12 Nov 2020 14:05:12 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 57521592C;
	Thu, 12 Nov 2020 14:05:11 +0100 (CET)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [216.205.24.124])
 by dpdk.org (Postfix) with ESMTP id 5FB265928
 for <dev@dpdk.org>; Thu, 12 Nov 2020 14:05:08 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1605186306;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=IhV8roiEDMN9z9j3dA6uPcBJwqc7+4IQRDVPcWa1/j0=;
 b=NfR98VekuaDYUVoCYzDL3qxouTnkr0idvlBy/itZFo1v816DCUwyq+kaKSIhDpWoPqVL6Y
 aOo8co2ilbjQWteiJ+JLLY6ekb/f9H8JXHadk2XCjzlJvuwuTFJhf9R2Xy9UrPuBQeJSrK
 unZqrcMR927RPxJE0qxx6Npdy2b7Pec=
Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com
 [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-191-IIz3EWW6N8up077eR30I-w-1; Thu, 12 Nov 2020 08:05:05 -0500
X-MC-Unique: IIz3EWW6N8up077eR30I-w-1
Received: by mail-vs1-f71.google.com with SMTP id h5so1717950vsq.16
 for <dev@dpdk.org>; Thu, 12 Nov 2020 05:05:04 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=IhV8roiEDMN9z9j3dA6uPcBJwqc7+4IQRDVPcWa1/j0=;
 b=pwnziFQefBst/plDtHvcQVBqpCjLq7lazSVcjF5j4pDRcaedxoDT+5I0T1G06pIhK4
 PkDJRyGi7A375AAfPkMiyvFWIJKJPaMxCIcmmdbjGJub4/b3gehCcOwhjZd5MVJESeCC
 CZIOpiiZsd20g/ERgCEH8wZv7ie9yftT1029I2quNVmbkasHS4ZTNV4fypMagRMonlSb
 j/IfmR9deV5xgvneASafdXjwOG8O4by91NquUP97YQfR89WJCUeMbGlExgOXAgYTYtss
 mem9JoeiXDVKONM2FiD5OdzsTOjpt/fxg/ANYkpk/lyuKemobITAB/lN5yyKBATWLBmW
 VvFw==
X-Gm-Message-State: AOAM531u4AVjkEsHrieawWsXgUaCdq0ZkQ/Xas4gqp0AycX+Io7Cun4u
 FLRNF6cbzlpjgambMgr4zB4HmY2DRtMsblZnZVkj1kN6p0Mi34Nodw9SdwVnof6Re90waKotjXm
 /sKf8jYmr9t4ihHXznCU=
X-Received: by 2002:a05:6102:4b6:: with SMTP id
 r22mr18548343vsa.10.1605186304498; 
 Thu, 12 Nov 2020 05:05:04 -0800 (PST)
X-Google-Smtp-Source: ABdhPJwFyBqdRwk/Q3bWT+YSO7mLSblcM34mS5PDxe0A8nM+NkFUhQAc45ItDhEOyj2Cw3Gb9Gk5yfao59HaHCQNRKw=
X-Received: by 2002:a05:6102:4b6:: with SMTP id
 r22mr18548310vsa.10.1605186304233; 
 Thu, 12 Nov 2020 05:05:04 -0800 (PST)
MIME-Version: 1.0
References: <20201106172854.237384-1-thomas@monjalon.net>
In-Reply-To: <20201106172854.237384-1-thomas@monjalon.net>
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 12 Nov 2020 14:04:52 +0100
Message-ID: <CAJFAV8zUGRqEJvbstk33eMc45xBUG9taK2ttNq4Wnyd8H6uN=w@mail.gmail.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev <dev@dpdk.org>, Bruce Richardson <bruce.richardson@intel.com>
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH 1/1] devtools: reduce build test verbosity
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Fri, Nov 6, 2020 at 6:29 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> The default verbosity of test-meson-builds.sh is to be quiet.
> In order to better apply the verbosity policy, some file descriptors
> are open to redirect to stdout or /dev/null accordingly.
>
> The target variable and meson/ninja commands are printed in verbose modes.
> The installation commands are printed only in very verbose mode.
> The examples build commands are printed only in very verbose mode.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  devtools/test-meson-builds.sh | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
> index 0c95d1cc98..469251b6ef 100755
> --- a/devtools/test-meson-builds.sh
> +++ b/devtools/test-meson-builds.sh
> @@ -65,7 +65,7 @@ load_env () # <target compiler>
>         else # toolchain not yet in PATH: its name should be enough
>                 DPDK_TARGET=$targetcc
>         fi
> -       echo "Using DPDK_TARGET $DPDK_TARGET"
> +       echo "Using DPDK_TARGET $DPDK_TARGET" >&$verbose
>         # config input: $DPDK_TARGET
>         . $srcdir/devtools/load-devel-config
>         # config output: $DPDK_MESON_OPTIONS, $PATH, $PKG_CONFIG_PATH, etc
> @@ -99,7 +99,7 @@ config () # <dir> <builddir> <meson options>
>                 options="$options -D$option"
>         done
>         options="$options $*"
> -       echo "$MESON $options $dir $builddir"
> +       echo "$MESON $options $dir $builddir" >&$verbose
>         $MESON $options $dir $builddir
>  }
>
> @@ -115,7 +115,6 @@ compile () # <builddir>
>                 echo "$ninja_cmd -C $builddir | cat"
>                 $ninja_cmd -C $builddir | cat
>         else
> -               echo "$ninja_cmd -C $builddir"
>                 $ninja_cmd -C $builddir
>         fi
>  }
> @@ -123,13 +122,8 @@ compile () # <builddir>
>  install_target () # <builddir> <installdir>
>  {
>         rm -rf $2
> -       if [ -n "$TEST_MESON_BUILD_VERY_VERBOSE$TEST_MESON_BUILD_VERBOSE" ]; then
> -               echo "DESTDIR=$2 $ninja_cmd -C $1 install"
> -               DESTDIR=$2 $ninja_cmd -C $1 install
> -       else
> -               echo "DESTDIR=$2 $ninja_cmd -C $1 install >/dev/null"
> -               DESTDIR=$2 $ninja_cmd -C $1 install >/dev/null
> -       fi
> +       echo "DESTDIR=$2 $ninja_cmd -C $1 install" >&$verbose
> +       DESTDIR=$2 $ninja_cmd -C $1 install >&$veryverbose
>  }
>
>  build () # <directory> <target compiler | cross file> <meson options>
> @@ -186,6 +180,7 @@ build () # <directory> <target compiler | cross file> <meson options>
>
>  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
> @@ -194,6 +189,10 @@ 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
> @@ -270,6 +269,7 @@ if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
>         export PKGCONF="pkg-config --define-prefix"
>         for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
>                 echo "## Building $example"
> -               $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean shared static
> +               $MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example \
> +                       clean shared static >&$veryverbose
>         done
>  fi
> --
> 2.28.0
>

Acked-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand