From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mta.qwilt.com (unknown [52.9.191.255]) by dpdk.org (Postfix) with ESMTP id 46CE71B5BA for ; Tue, 18 Dec 2018 15:03:10 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta.qwilt.com (Postfix) with ESMTP id 9DAC280CB75; Tue, 18 Dec 2018 14:03:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at qwilt.com Received: from mta.qwilt.com ([127.0.0.1]) by localhost (mta.qwilt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BS6A1JJxB8Q9; Tue, 18 Dec 2018 14:03:08 +0000 (UTC) Received: from rd01.it.qwilt.com.qwilt.com (80.179.204.39.cable.012.net.il [80.179.204.39]) by mta.qwilt.com (Postfix) with ESMTPSA id F341080CB4B; Tue, 18 Dec 2018 14:03:06 +0000 (UTC) From: Arnon Warshavsky To: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com, thomasm@mellanox.com Cc: dev@dpdk.org, arnon@qwilt.com Date: Tue, 18 Dec 2018 16:03:02 +0200 Message-Id: <1545141782-31841-1-git-send-email-arnon@qwilt.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH v1] devtools: fix error propagation from check-forbidden-tokens.awk 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: , X-List-Received-Date: Tue, 18 Dec 2018 14:03:10 -0000 Bugzilla ID: 165 Fixes: 4d4c612e6a30 ("devtools: check wrong svg include in guides") Signed-off-by: Arnon Warshavsky 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() { # + 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