[vala/0.40] testrunner: Invalid tests and therefore expected failures must return 1



commit 3ac9e67d852f4ce7f9e6fd40609d626c1fe30caa
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Feb 5 08:32:53 2020 +0100

    testrunner: Invalid tests and therefore expected failures must return 1

 tests/testrunner.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/tests/testrunner.sh b/tests/testrunner.sh
index 7426112d1..076e46e49 100755
--- a/tests/testrunner.sh
+++ b/tests/testrunner.sh
@@ -122,7 +122,11 @@ function sourceend() {
        if [ -n "$testpath" ]; then
                if [ $INVALIDCODE -eq 1 ]; then
                        PACKAGEFLAGS=$([ -z "$PACKAGES" ] || echo $PACKAGES | xargs -n 1 echo -n " --pkg")
-                       echo "! $VALAC $VALAFLAGS $PACKAGEFLAGS -C $SOURCEFILE" > check
+                       echo '' > prepare
+                       echo "$VALAC $VALAFLAGS $PACKAGEFLAGS -C $SOURCEFILE" > check
+                       echo "RET=\$?" >> check
+                       echo "if [ \$RET -ne 1 ]; then exit 1; fi" >> check
+                       echo "exit 0" >> check
                elif [ $GIRTEST -eq 1 ]; then
                        if [ $PART -eq 1 ]; then
                                echo "  </namespace>" >> $SOURCEFILE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]