Skip to content
Snippets Groups Projects
Commit 5303265a authored by Bernd Schubert's avatar Bernd Schubert Committed by Michal Marek
Browse files

coccicheck: Allow to show the executed command line


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: default avatarBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: default avatarNicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 26e56720
No related branches found
No related tags found
No related merge requests found
...@@ -55,6 +55,14 @@ if [ "$ONLINE" = "0" ] ; then ...@@ -55,6 +55,14 @@ if [ "$ONLINE" = "0" ] ; then
echo '' echo ''
fi fi
run_cmd() {
if [ $VERBOSE -ne 0 ] ; then
echo "Running: $@"
fi
eval $@
}
coccinelle () { coccinelle () {
COCCI="$1" COCCI="$1"
...@@ -100,15 +108,21 @@ coccinelle () { ...@@ -100,15 +108,21 @@ coccinelle () {
fi fi
if [ "$MODE" = "chain" ] ; then if [ "$MODE" = "chain" ] ; then
$SPATCH -D patch $FLAGS -sp_file $COCCI $OPT $OPTIONS || \ run_cmd $SPATCH -D patch \
$SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || \ $FLAGS -sp_file $COCCI $OPT $OPTIONS || \
$SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || \ run_cmd $SPATCH -D report \
$SPATCH -D org $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff || exit 1 $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 elif [ "$MODE" = "rep+ctxt" ] ; then
$SPATCH -D report $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \ run_cmd $SPATCH -D report \
$SPATCH -D context $FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1 $FLAGS -sp_file $COCCI $OPT $OPTIONS -no_show_diff && \
run_cmd $SPATCH -D context \
$FLAGS -sp_file $COCCI $OPT $OPTIONS || exit 1
else 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 fi
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment