From 150c29b7e4c8ebd4f8dae4669473e7bdf50d3403 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 18 Jun 2014 10:17:25 -0400 Subject: [PATCH] tests.sh: soso are always detected as failed tests A `soso` is when a test fails only because errors and warnings differs. Signed-off-by: Jean Privat --- tests/tests.sh | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/tests/tests.sh b/tests/tests.sh index 6483969..1c42a68 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -44,7 +44,6 @@ Usage: $e [options] modulenames -h This help --engine Use a specific engine (default=nitg) --noskip Do not skip a test even if the .skip file matches ---[no]soso Force enable (or disable) SOSO END } @@ -64,12 +63,11 @@ function compare_to_result() if [ "$?" == 0 ]; then return 1 fi - [ -z "$soso" ] && return 3 sed '/[Ww]arning/d;/[Ee]rror/d' "out/$pattern.res" > "out/$pattern.res2" sed '/[Ww]arning/d;/[Ee]rror/d' "$sav" > "out/$pattern.sav2" grep '[Ee]rror' "out/$pattern.res" >/dev/null && echo "Error" >> "out/$pattern.res2" grep '[Ee]rror' "$sav" >/dev/null && echo "Error" >> "out/$pattern.sav2" - diff -u "out/$pattern.sav2" "out/$pattern.res2" > "out/$pattern.diff.sav.log" + diff -u "out/$pattern.sav2" "out/$pattern.res2" > "out/$pattern.diff.sav.log2" if [ "$?" == 0 ]; then return 2 else @@ -109,7 +107,10 @@ function process_result() LIST="$LIST $sav" ;; 2) - SOSOF="$sav" + if [ -z "$FIRST" ]; then + SOSOF="$sav" + FIRST="$sav" + fi LIST="$LIST $sav" ;; 3) @@ -132,7 +133,10 @@ function process_result() LIST="$LIST $sav" ;; 2) - SOSO="$sav" + if [ -z "$FIRST" ]; then + SOSO="$sav" + FIRST="$sav" + fi LIST="$LIST $sav" ;; 3) @@ -166,17 +170,26 @@ function process_result() echo >>$xml "" fi todos="$todos $pattern" - elif [ -n "$SOSO" ]; then - echo "[soso] out/$pattern.res $SOSO" - ok="$ok $pattern" elif [ "x$NYI" = "x0" ]; then echo "[todo] out/$pattern.res -> not yet implemented" echo >>$xml "" todos="$todos $pattern" + elif [ -n "$SOSO" ]; then + echo "[======= soso out/$pattern.res $SOSO =======]" + echo >>$xml "" + echo >>$xml ">$xml -n 50 + echo >>$xml "]]>" + nok="$nok $pattern" + echo "$ii" >> "$ERRLIST" elif [ -n "$SOSOF" ]; then - echo "[fixme soso] out/$pattern.res $SOSOF" - echo >>$xml "" - todos="$todos $pattern" + echo "[======= fixme soso out/$pattern.res $SOSOF =======]" + echo >>$xml "" + echo >>$xml ">$xml -n 50 + echo >>$xml "]]>" + nok="$nok $pattern" + echo "$ii" >> "$ERRLIST" elif [ -n "$NSAV" ]; then echo "[======= fail out/$pattern.res $NSAV =======]" echo >>$xml "" @@ -272,8 +285,6 @@ while [ $stop = false ]; do -h) usage; exit;; --engine) engine="$2"; shift; shift;; --noskip) noskip=true; shift;; - --soso) soso=true; shift;; - --nososo) nososo=true; shift;; *) stop=true esac done -- 1.7.9.5