[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] {ylwrap-refactor} ylwrap: warn when expected output files are miss
From: |
Stefano Lattarini |
Subject: |
[FYI] {ylwrap-refactor} ylwrap: warn when expected output files are missing |
Date: |
Thu, 5 May 2011 18:26:06 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
* 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 <address@hidden>
+ 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 <address@hidden>
+
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
- [FYI] {ylwrap-refactor} Refactoring (eventual rewriting) of the `ylwrap' script., Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: various refactorings, few improvements, Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: fixlets in option parsing, Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: make less general and more "expert", Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: new subroutine `tr_cpp', Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: new subroutine `handle_renaming', Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: warn when expected output files are missing,
Stefano Lattarini <=
- [FYI] {ylwrap-refactor} ylwrap: cleanup refactoring (no semantic change), Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: another cleanup refactoring (no semantic change), Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: get rid of the loop on "FROM TARGET" couples, Stefano Lattarini, 2011/05/05
- FYI] {ylwrap-refactor} ylwrap: go into tempdir only when running wrapped program, Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: pull `dos_fix_yacc_filenames' out of `handle_renaming', Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: move "update if changed" logic out of `handle_renaming', Stefano Lattarini, 2011/05/05
- [FYI] {ylwrap-refactor} ylwrap: some renaming of variables and subroutines, Stefano Lattarini, 2011/05/06
- [FYI] {ylwrap-refactor} ylwrap: fix indentation, Stefano Lattarini, 2011/05/06
- [FYI] {ylwrap-refactor} ylwrap: rename 'handle_renaming' to 'tempfile_deploy', Stefano Lattarini, 2011/05/06
- [FYI] {ylwrap-refactor} merged branch 'yacc-work', Stefano Lattarini, 2011/05/06