tests: *todo* and *fail* marked as skiped in the XML juint file
authorJean Privat <jean@pryen.org>
Mon, 10 Mar 2014 15:12:06 +0000 (11:12 -0400)
committerJean Privat <jean@pryen.org>
Mon, 10 Mar 2014 17:34:49 +0000 (13:34 -0400)
There is no way, in the JUnit format to distinguish between *expected
success* and *expected failure*.
But there is a distinction between *run* and *skipped* (shown as green and
yellow by Jenkins).
This hack overload the currently useless *skipped* status to mark expected
failure (todo and fixme).

Signed-off-by: Jean Privat <jean@pryen.org>

tests/tests.sh

index 8de440f..7f291d0 100755 (executable)
@@ -145,6 +145,7 @@ function process_result()
                        remains="$remains $OLD"
                else
                        echo "[fixme] out/$pattern.res $FIXME"
+                       echo >>$xml "<skipped/>"
                fi
                todos="$todos $pattern"
        elif [ -n "$SOSO" ]; then
@@ -159,6 +160,7 @@ function process_result()
                        echo "not ok - $description # TODO not yet implemented"
                else
                        echo "[todo] out/$pattern.res -> not yet implemented"
+                       echo >>$xml "<skipped/>"
                fi
                todos="$todos $pattern"
        elif [ -n "$SOSOF" ]; then
@@ -166,6 +168,7 @@ function process_result()
                        echo "not ok - $description # TODO SOSO expected failure"
                else
                        echo "[fixme soso] out/$pattern.res $SOSOF"
+                       echo >>$xml "<skipped/>"
                fi
                todos="$todos $pattern"
        elif [ -n "$NSAV" ]; then