* lib/ylwrap (handle_renaming): Warn if an expected output file from the wrapped program is missing, instead of just erroring out silently. * tests/ylwrap-fail.test: Extend. --- ChangeLog | 8 ++++++++ lib/ylwrap | 5 ++++- tests/ylwrap-fail.test | 2 ++ 3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 870d41b..e262cce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2011-05-05 Stefano Lattarini <stefano.lattar...@gmail.com> + ylwrap: warn when expected output files are missing + * lib/ylwrap (handle_renaming): Warn if an expected output file + from the wrapped program is missing, instead of just erroring out + silently. + * tests/ylwrap-fail.test: Extend. + +2011-05-05 Stefano Lattarini <stefano.lattar...@gmail.com> + ylwrap: new subroutine `handle_renaming' * lib/ylwrap: Move most of the code in the main loop into ... (handle_renaming): ... this new subroutine. diff --git a/lib/ylwrap b/lib/ylwrap index 0b0c7e8..77e68a3 100755 --- a/lib/ylwrap +++ b/lib/ylwrap @@ -142,7 +142,10 @@ handle_renaming () # used, we don't want an error when the `y.output' file is "missing". case $wrapped:$ofrom in yacc:y.tab.h|yacc:y.output) ;; - *) ret=1;; + *) + echo "ylwrap: expected file \`$from' not found" >&2 + ret=1 + ;; esac fi } diff --git a/tests/ylwrap-fail.test b/tests/ylwrap-fail.test index 149fa0f..b328153 100755 --- a/tests/ylwrap-fail.test +++ b/tests/ylwrap-fail.test @@ -86,6 +86,7 @@ cd dummy1 $SHELL ../ylwrap --yacc .y foo.y foo.c -- true 2>../stderr \ && { cat ../stderr >&2; Exit 1; } cat ../stderr >&2 +grep "^ylwrap: expected file \`y\.tab\.c' not found" ../stderr check_emptydir cd .. @@ -94,6 +95,7 @@ cd dummy2 $SHELL ../ylwrap --lex lex.yy foo.l foo.c -- true 2>../stderr \ && { cat ../stderr >&2; Exit 1; } cat ../stderr >&2 +grep "^ylwrap: expected file \`lex\.yy\.c' not found" ../stderr check_emptydir cd .. -- 1.7.2.3