tests: add option to skip tests per OS
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 9 Dec 2014 23:02:15 +0000 (18:02 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 10 Dec 2014 12:59:16 +0000 (07:59 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

tests/tests.sh

index d44d2fd..fb3eb86 100755 (executable)
@@ -316,6 +316,14 @@ need_skip()
                echo >>$xml "<testcase classname='`xmlesc "$3"`' name='`xmlesc "$2"`' `timestamp`><skipped/></testcase>"
                return 0
        fi
+
+       # Skip by OS
+       os_skip_file=`uname`.skip
+       if test -e $os_skip_file && echo "$1" | grep -f "$os_skip_file"; then
+               echo "=> $2: [skip os]"
+               echo >>$xml "<testcase classname='`xmlesc "$3"`' name='`xmlesc "$2"`' `timestamp`><skipped/></testcase>"
+               return 0
+       fi
        return 1
 }