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 8CC61A04E6; Wed, 18 Nov 2020 11:57:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E4B1A592C; Wed, 18 Nov 2020 11:56:58 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id 9ECE058C4 for ; Wed, 18 Nov 2020 11:56:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605697015; 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=RUy5yCKoH7C0DCF2NyKn30Y31BzBQU06/1w02PKV898=; b=BRTCS8OYz2YtzmEYUFaFi+Q/HeBxMmkdlJKZ2tOOseRWgFsIXMsPIa2DKd+uyEpDkoSt/1 BZ9OY4N/gytGxDpF4hO3eNMPZ5HTsoaYt8iLSxznI9IRlkivcbQe5E2obi3EeCQq9VlQTQ 30EfY/I6ESTedZtpuS8trFT8MnW1EyM= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-536--Zn0KGSOO_6zhB07pvfbQA-1; Wed, 18 Nov 2020 05:56:53 -0500 X-MC-Unique: -Zn0KGSOO_6zhB07pvfbQA-1 Received: by mail-vk1-f198.google.com with SMTP id g3so515574vkl.13 for ; Wed, 18 Nov 2020 02:56:52 -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=RUy5yCKoH7C0DCF2NyKn30Y31BzBQU06/1w02PKV898=; b=BIChd85B1LXm8WSI4HKKF4loG50PAMy5CnzgALeRIt7aMb5ik8Tl26ms8ej/PHTY6i zDdE7lE0q4/s2JrNiHY4QgayiQvPWfv+J3aX24x/Kzbf51k8+Oo6D7/gWs0kdTTJPzjM YNZSFeJ7LbhoQM5Fjf8TmzlUMfQIYgOEbThgAjdukdCK28ijARjNo4USzIChLMgBo5t8 +uVgdKWNqy6Zcw0Bnxp8dFg+BVXUbvpzEGnnXNZ93PQv/QOnZjJ+VqMWYsksMNTy28Ls HyeeP3k1hd04mTF097Qv24j4VBM6ylkNfqRUWbJQGTd+Yq3Lah4u1rI8A/wDNGigp0zQ zh6Q== X-Gm-Message-State: AOAM5319xonhkwR00TJXxUXJEbtd27GyKU7m8BNsWl14u1NFI0aWs/HI gFpKuHahuFufOjsJ7pfl31IkCn7pVJcMLbD8aEQrfbsaDguWl3DbRffEUtOyQk7vbUUIngUEtQi eLHzmhgPPHImTZgQZrTo= X-Received: by 2002:a05:6102:4b6:: with SMTP id r22mr2601997vsa.10.1605697012538; Wed, 18 Nov 2020 02:56:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0duUJ+vt+fxLbsLrfoe0FPFchyM/9YnJvpwRIHs27RHBAE4FQvL8Rf39wo/wAk8QZkOgdLcFkO0vWzLgwT/c= X-Received: by 2002:a05:6102:4b6:: with SMTP id r22mr2601990vsa.10.1605697012304; Wed, 18 Nov 2020 02:56:52 -0800 (PST) MIME-Version: 1.0 References: <20201112163901.1728959-1-thomas@monjalon.net> <20201117103826.585604-1-thomas@monjalon.net> In-Reply-To: <20201117103826.585604-1-thomas@monjalon.net> From: David Marchand Date: Wed, 18 Nov 2020 11:56:41 +0100 Message-ID: To: Thomas Monjalon Cc: dev , Bruce Richardson 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 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" On Tue, Nov 17, 2020 at 11:38 AM Thomas Monjalon wrote: > > 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 > Reviewed-by: David Marchand -- David Marchand