From: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
To: linux-kernel@vger.kernel.org
Cc: Julia Lawall <Julia.Lawall@lip6.fr>,
Nicolas Palix <nicolas.palix@imag.fr>,
cocci@systeme.lip6.fr
Subject: [PATCH 2/2] coccicheck: Allow to show the executed command line
Date: Tue, 22 Jan 2013 14:34:39 +0100 [thread overview]
Message-ID: <20130122133439.2543274.56232.stgit@fsdevel3> (raw)
In-Reply-To: <20130122133434.2543274.86646.stgit@fsdevel3>
On my system one of the tests failed with
"Fatal error: exception Failure("No OCaml compiler found! Install either ocamlopt or ocamlopt.opt")".
Investigating such issues is easier if the executed command line is being shown.
Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
CC: Nicolas Palix <nicolas.palix@imag.fr>
CC: cocci@systeme.lip6.fr
---
scripts/coccicheck | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/scripts/coccicheck b/scripts/coccicheck
index eab0b00..fb98534 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -52,6 +52,14 @@ if [ "$ONLINE" = "0" ] ; then
echo ''
fi
+run_cmd() {
+ if [ "$RUN_VERBOSE" != "0" ] ; then
+ echo "Running: $@"
+ fi
+ eval $@
+}
+
+
coccinelle () {
COCCI="$1"
@@ -97,15 +105,21 @@ coccinelle () {
fi
if [ "$MODE" = "chain" ] ; then
- $SPATCH -D patch $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
- $SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \
- $SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
- $SPATCH -D org $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1
+ run_cmd $SPATCH -D patch \
+ $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
+ run_cmd $SPATCH -D report \
+ $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \
+ run_cmd $SPATCH -D context \
+ $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
+ run_cmd $SPATCH -D org \
+ $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1
elif [ "$MODE" = "rep+ctxt" ] ; then
- $SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \
- $SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
+ run_cmd $SPATCH -D report \
+ $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \
+ run_cmd $SPATCH -D context \
+ $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
else
- $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
+ run_cmd $SPATCH -D $MODE $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
fi
}
next prev parent reply other threads:[~2013-01-22 13:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 13:34 [PATCH 1/2] coccicheck: Allow the user to give a VERBOSE= argument Bernd Schubert
2013-01-22 13:34 ` Bernd Schubert [this message]
2013-01-22 14:31 ` Nicolas Palix
2013-01-22 15:05 ` Bernd Schubert
2013-01-23 8:29 ` Nicolas Palix
2013-02-01 10:36 ` Bernd Schubert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130122133439.2543274.56232.stgit@fsdevel3 \
--to=bernd.schubert@itwm.fraunhofer.de \
--cc=Julia.Lawall@lip6.fr \
--cc=cocci@systeme.lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.palix@imag.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox