tests: fix errlist
authorJean Privat <jean@pryen.org>
Thu, 28 Aug 2014 02:37:34 +0000 (22:37 -0400)
committerJean Privat <jean@pryen.org>
Thu, 28 Aug 2014 19:48:09 +0000 (15:48 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

.gitignore
tests/tests.sh

index 30cf0fc..8ed1a4e 100644 (file)
@@ -44,6 +44,7 @@ contrib/*/bin
 
 tests/alt
 tests/errlist
+tests/errlist.bak
 tests/out
 tests/*.xml
 tests/nitunit
index 5bdefd2..f1daadd 100755 (executable)
@@ -216,6 +216,7 @@ function process_result()
                cat -v >>$xml out/$pattern.res
                echo >>$xml "]]></system-out>"
                nos="$nos $pattern"
+               echo "$ii" >> "$ERRLIST"
        else
                # no sav but empty res
                echo "[0k] out/$pattern.res is empty"
@@ -580,10 +581,11 @@ fi
 
 # write $ERRLIST
 if [ "x$ERRLIST" != "x" ]; then
-       if [ -x "$ERRLIST_TARGET" ]; then
+       if [ -f "$ERRLIST_TARGET" ]; then
                mv "$ERRLIST_TARGET" "${ERRLIST_TARGET}.bak"
        fi
-       mv $ERRLIST $ERRLIST_TARGET
+       uniq $ERRLIST > $ERRLIST_TARGET
+       rm $ERRLIST
 fi
 
 echo >>$xml "</testsuite></testsuites>"