From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752768AbcFNWLs (ORCPT ); Tue, 14 Jun 2016 18:11:48 -0400 Received: from mail.kernel.org ([198.145.29.136]:38228 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751571AbcFNWKZ (ORCPT ); Tue, 14 Jun 2016 18:10:25 -0400 From: "Luis R. Rodriguez" To: Julia.Lawall@lip6.fr, Gilles.Muller@lip6.fr, nicolas.palix@imag.fr, mmarek@suse.com Cc: linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr, "Luis R. Rodriguez" Subject: [PATCH 1/4] coccicheck: propagate error and stop processing after first error Date: Tue, 14 Jun 2016 15:10:14 -0700 Message-Id: <1465942217-14452-2-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1465942217-14452-1-git-send-email-mcgrof@kernel.org> References: <1465942217-14452-1-git-send-email-mcgrof@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Propagate back in the shell Coccinelle's error. Also stop processing if an error has occured. This lets us handle some errors in coccinelle cocci files and if they bail out we should inspect the errors. This will be more useful later to help annotate coccinelle version dependency requirements. Signed-off-by: Luis R. Rodriguez --- scripts/coccicheck | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/coccicheck b/scripts/coccicheck index 37db7ac1dfae..ba7301ab0a3d 100755 --- a/scripts/coccicheck +++ b/scripts/coccicheck @@ -215,6 +215,11 @@ run_cmd_parmap() { echo "Running ($NPROC in parallel): $@" fi $@ 2> ${DIR}/coccicheck.$$.err + if [[ $? -ne 0 ]]; then + echo "coccicheck failed" + cat $${DIR}/coccicheck.$$.err + exit $? + fi } run_cmd_old() { -- 2.8.2