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

Message ID 1517492959-15104-1-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

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

Commit Message

Andrew Rybchenko Feb. 1, 2018, 1:49 p.m. UTC
  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>
---
 buildtools/check-experimental-syms.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
  

Comments

Thomas Monjalon Feb. 6, 2018, 12:19 a.m. UTC | #1
01/02/2018 14:49, Andrew Rybchenko:
> -		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 <<EOM
> +$SYM is not flagged as experimental
> +but is listed in version map
> +Please add __rte_experimental to the definition of $SYM
> +EOM

You could use <<- EOM and keep indentation of the message.
You can check how it's done in devtools scripts.
  

Patch

diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
index 7d21de3..7f5aa61 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 <<EOM
+$SYM is not flagged as experimental
+but is listed in version map
+Please add __rte_experimental to the definition of $SYM
+EOM
 		exit 1
 	fi
 done