[dpdk-dev,v2] buildtools: output build failure reason to stderr

Message ID 1517991840-3612-1-git-send-email-arybchenko@solarflare.com
State Accepted, archived
Headers show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Feb. 7, 2018, 8:24 a.m.
If build fails because of failed experimental check and stdout is
redirected to /dev/null, it is absolutely unclear why build fails.

Fixes: a4bcd61de82d ("buildtools: add script to check experimental API exports")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
v2:
 - use <<- to keep indentation of the message

 buildtools/check-experimental-syms.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Neil Horman Feb. 7, 2018, 12:24 p.m. | #1
On Wed, Feb 07, 2018 at 08:24:00AM +0000, Andrew Rybchenko wrote:
> If build fails because of failed experimental check and stdout is
> redirected to /dev/null, it is absolutely unclear why build fails.
> 
> Fixes: a4bcd61de82d ("buildtools: add script to check experimental API exports")
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> ---
> v2:
>  - use <<- to keep indentation of the message
> 
>  buildtools/check-experimental-syms.sh | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
> index 7d21de3..5bc8cda 100755
> --- a/buildtools/check-experimental-syms.sh
> +++ b/buildtools/check-experimental-syms.sh
> @@ -22,9 +22,11 @@ do
>  	IN_EXP=$?
>  	if [ $IN_TEXT -eq 0 -a $IN_EXP -ne 0 ]
>  	then
> -		echo "$SYM is not flagged as experimental"
> -		echo "but is listed in version map"
> -		echo "Please add __rte_experimental to the definition of $SYM"
> +		cat >&2 <<- END_OF_MESSAGE
> +		$SYM is not flagged as experimental
> +		but is listed in version map
> +		Please add __rte_experimental to the definition of $SYM
> +		END_OF_MESSAGE
>  		exit 1
>  	fi
>  done
> -- 
> 2.7.4
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Thomas Monjalon Feb. 8, 2018, 9:26 p.m. | #2
07/02/2018 13:24, Neil Horman:
> On Wed, Feb 07, 2018 at 08:24:00AM +0000, Andrew Rybchenko wrote:
> > If build fails because of failed experimental check and stdout is
> > redirected to /dev/null, it is absolutely unclear why build fails.
> > 
> > Fixes: a4bcd61de82d ("buildtools: add script to check experimental API exports")
> > 
> > Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied, thanks

Patch

diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
index 7d21de3..5bc8cda 100755
--- a/buildtools/check-experimental-syms.sh
+++ b/buildtools/check-experimental-syms.sh
@@ -22,9 +22,11 @@  do
 	IN_EXP=$?
 	if [ $IN_TEXT -eq 0 -a $IN_EXP -ne 0 ]
 	then
-		echo "$SYM is not flagged as experimental"
-		echo "but is listed in version map"
-		echo "Please add __rte_experimental to the definition of $SYM"
+		cat >&2 <<- END_OF_MESSAGE
+		$SYM is not flagged as experimental
+		but is listed in version map
+		Please add __rte_experimental to the definition of $SYM
+		END_OF_MESSAGE
 		exit 1
 	fi
 done