DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] devtools: fix error propagation from check-forbidden-tokens.awk
@ 2018-12-18 14:03 Arnon Warshavsky
  2018-12-18 14:12 ` David Marchand
  2018-12-18 15:19 ` [dpdk-dev] [PATCH v2] " Arnon Warshavsky
  0 siblings, 2 replies; 18+ messages in thread
From: Arnon Warshavsky @ 2018-12-18 14:03 UTC (permalink / raw)
  To: ferruh.yigit, ajit.khaparde, thomasm; +Cc: dev, arnon

Bugzilla ID: 165
Fixes: 4d4c612e6a30 ("devtools: check wrong svg include in guides")
Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>

Explicitly collect the output and result of the
multiple awk script calls, print and return error
if any of them fails
---
 devtools/checkpatches.sh | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index ee8debe..df4336c 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -44,22 +44,35 @@ print_usage () {
 }
 
 check_forbidden_additions() { # <patch>
+	res=0
+
 	# refrain from new additions of rte_panic() and rte_exit()
 	# multiple folders and expressions are separated by spaces
-	awk -v FOLDERS="lib drivers" \
+	result=$(awk -v FOLDERS="lib drivers" \
 		-v EXPRESSIONS="rte_panic\\\( rte_exit\\\(" \
 		-v RET_ON_FAIL=1 \
 		-v MESSAGE='Using rte_panic/rte_exit' \
 		-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
-		"$1"
+		"$1")
+	if [ $? -ne 0 ] ; then
+		echo $result
+		res=1
+	fi
+
 	# svg figures must be included with wildcard extension
 	# because of png conversion for pdf docs
-	awk -v FOLDERS='doc' \
+	result=$(awk -v FOLDERS='doc' \
 		-v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
 		-v RET_ON_FAIL=1 \
 		-v MESSAGE='Using explicit .svg extension instead of .*' \
 		-f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \
-		"$1"
+		"$1")
+        if [ $? -ne 0 ] ; then
+                echo $result
+                res=1
+        fi
+
+	return $res
 }
 
 number=0
-- 
1.8.3.1

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

end of thread, other threads:[~2019-01-18  4:59 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-18 14:03 [dpdk-dev] [PATCH v1] devtools: fix error propagation from check-forbidden-tokens.awk Arnon Warshavsky
2018-12-18 14:12 ` David Marchand
2018-12-18 14:16   ` David Marchand
2018-12-18 14:27     ` David Marchand
2018-12-18 14:35       ` Thomas Monjalon
2018-12-18 14:44         ` Arnon Warshavsky
2018-12-18 14:48           ` Thomas Monjalon
2018-12-18 14:49           ` David Marchand
2018-12-18 14:53             ` Arnon Warshavsky
2018-12-18 14:55               ` David Marchand
2018-12-18 15:19 ` [dpdk-dev] [PATCH v2] " Arnon Warshavsky
2018-12-21  0:59   ` Thomas Monjalon
2019-01-17 12:20     ` David Marchand
2019-01-17 15:32       ` Thomas Monjalon
2019-01-17 17:25         ` David Marchand
2019-01-17 21:34           ` Ajit Khaparde
2019-01-17 21:47             ` Thomas Monjalon
2019-01-18  4:59               ` Ajit Khaparde

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).