nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: Add errlist
[nit.git]
/
tests
/
tests.sh
diff --git
a/tests/tests.sh
b/tests/tests.sh
index
5b4de38
..
1f400bb
100755
(executable)
--- a/
tests/tests.sh
+++ b/
tests/tests.sh
@@
-27,10
+27,24
@@
# Mark to distinguish files among tests
# MARK=
# Mark to distinguish files among tests
# MARK=
+# File where error tests are outputed
+# Old ERRLIST is backuped
+ERRLIST=${ERRLIST:-errlist}
+
if [ $# = 0 ]; then
echo "usage: $0 file.nit ..."
fi
if [ $# = 0 ]; then
echo "usage: $0 file.nit ..."
fi
+# Backup and initiate new ERRLIST
+if [ "x$ERRLIST" = "x" ]; then
+ ERRLIST=/dev=null
+else
+ if [ -x "$ERRLIST" ]; then
+ mv "$ERRLIST" "${ERRLIST}.bak"
+ fi
+ > "$ERRLIST"
+fi
+
ok=""
nok=""
ok=""
nok=""
@@
-90,6
+104,7
@@
for ii in "$@"; do
else
echo "[======= fail $ff.res sav/$ff.sav =======]"
nok="$nok $ff"
else
echo "[======= fail $ff.res sav/$ff.sav =======]"
nok="$nok $ff"
+ echo "$ii" >> "$ERRLIST"
fi
else
echo "[=== no sav ===] $ff.res"
fi
else
echo "[=== no sav ===] $ff.res"
@@
-102,7
+117,7
@@
echo "ok: " `echo $ok | wc -w` "/" `echo $ok $nok $nos | wc -w`
if [ -n "$nok" ]; then
echo "fail: $nok"
if [ -n "$nok" ]; then
echo "fail: $nok"
- echo "There were errors !"
+ echo "There were errors ! (see file $ERRLIST)"
fi
if [ -n "$nos" ]; then
echo "no sav: $nos"
fi
if [ -n "$nos" ]; then
echo "no sav: $nos"