tests: skip tests by hostname
authorJean Privat <jean@pryen.org>
Tue, 23 Jun 2015 15:03:25 +0000 (11:03 -0400)
committerJean Privat <jean@pryen.org>
Tue, 23 Jun 2015 15:36:13 +0000 (11:36 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/tests.sh

index 66a53a0..b07755c 100755 (executable)
@@ -366,6 +366,14 @@ need_skip()
                echo >>$xml "<testcase classname='`xmlesc "$3"`' name='`xmlesc "$2"`' `timestamp`><skipped/></testcase>"
                return 0
        fi
+
+       # Skip by hostname
+       host_skip_file=`hostname -s`.skip
+       if test -e $host_skip_file && echo "$1" | grep -f "$host_skip_file" >/dev/null 2>&1; then
+               echo "=> $2: [skip hostname]"
+               echo >>$xml "<testcase classname='`xmlesc "$3"`' name='`xmlesc "$2"`' `timestamp`><skipped/></testcase>"
+               return 0
+       fi
        return 1
 }