DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/1] devtools: reduce build test verbosity
@ 2020-11-06 17:28 Thomas Monjalon
  2020-11-12 13:04 ` David Marchand
  2020-11-12 13:08 ` Bruce Richardson
  0 siblings, 2 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-11-06 17:28 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, bruce.richardson

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] devtools: reduce build test verbosity
  2020-11-06 17:28 [dpdk-dev] [PATCH 1/1] devtools: reduce build test verbosity Thomas Monjalon
@ 2020-11-12 13:04 ` David Marchand
  2020-11-12 13:08 ` Bruce Richardson
  1 sibling, 0 replies; 4+ messages in thread
From: David Marchand @ 2020-11-12 13:04 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Bruce Richardson

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] devtools: reduce build test verbosity
  2020-11-06 17:28 [dpdk-dev] [PATCH 1/1] devtools: reduce build test verbosity Thomas Monjalon
  2020-11-12 13:04 ` David Marchand
@ 2020-11-12 13:08 ` Bruce Richardson
  2020-11-12 14:31   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2020-11-12 13:08 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, david.marchand

On Fri, Nov 06, 2020 at 06:28:54PM +0100, Thomas Monjalon 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>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] devtools: reduce build test verbosity
  2020-11-12 13:08 ` Bruce Richardson
@ 2020-11-12 14:31   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-11-12 14:31 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Bruce Richardson

12/11/2020 14:08, Bruce Richardson:
> On Fri, Nov 06, 2020 at 06:28:54PM +0100, Thomas Monjalon 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>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-12 14:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 17:28 [dpdk-dev] [PATCH 1/1] devtools: reduce build test verbosity Thomas Monjalon
2020-11-12 13:04 ` David Marchand
2020-11-12 13:08 ` Bruce Richardson
2020-11-12 14:31   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).