[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAxaTiOGUo092Fgigs2U0R7Ry0HPvLTFqvvANp8TMFJbY+KgLw@mail.gmail.com>
Date: Fri, 1 Feb 2013 10:07:06 +0100
From: Nicolas Palix <nicolas.palix@...g.fr>
To: Bernd Schubert <bernd.schubert@...m.fraunhofer.de>
Cc: linux-kernel@...r.kernel.org, Michal Marek <mmarek@...e.cz>,
Julia Lawall <Julia.Lawall@...6.fr>, cocci@...teme.lip6.fr
Subject: Re: [PATCH 2 2/2] coccicheck: Allow to show the executed command line
On Tue, Jan 29, 2013 at 5:03 PM, Bernd Schubert
<bernd.schubert@...m.fraunhofer.de> wrote:
> 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@...m.fraunhofer.de>
> CC: Julia Lawall <Julia.Lawall@...6.fr>
> CC: Nicolas Palix <nicolas.palix@...g.fr>
Acked-by: Nicolas Palix <nicolas.palix@...g.fr>
> CC: cocci@...teme.lip6.fr
> CC: Michal Marek <mmarek@...e.cz>
> ---
> scripts/coccicheck | 28 +++++++++++++++++++++-------
> 1 file changed, 21 insertions(+), 7 deletions(-)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index f8f15a2..85d3189 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -55,6 +55,14 @@ if [ "$ONLINE" = "0" ] ; then
> echo ''
> fi
>
> +run_cmd() {
> + if [ $VERBOSE -ne 0 ] ; then
> + echo "Running: $@"
> + fi
> + eval $@
> +}
> +
> +
> coccinelle () {
> COCCI="$1"
>
> @@ -100,15 +108,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
>
> }
>
--
Nicolas Palix
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists