提交 5303265a 编写于 作者: B Bernd Schubert 提交者: Michal Marek

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: NBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: NNicolas Palix <nicolas.palix@imag.fr>
Signed-off-by: NMichal Marek <mmarek@suse.cz>
上级 26e56720
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册