subunit: Add a sh macro for skipping a test
authorAndrew Bartlett <abartlet@samba.org>
Fri, 15 Feb 2013 22:36:07 +0000 (09:36 +1100)
committerStefan Metzmacher <metze@samba.org>
Mon, 4 Mar 2013 07:18:07 +0000 (08:18 +0100)
Reviewed-by: Stefan Metzmacher <metze@samba.org>
testprogs/blackbox/subunit.sh

index 9b047a2d5dfa51f47b7d0efef3d452d26c0da0cd..3ed08826ee51c7090515ca7d19a4a6b0b8e38832 100755 (executable)
@@ -54,6 +54,16 @@ subunit_error_test () {
   echo "]"
 }
 
+subunit_skip_test () {
+  # emit the current protocol skip-marker for test $1, and emit stdin as
+  # the error text.
+  # we use stdin because the failure message can be arbitrarily long, and this
+  # makes it convenient to write in scripts (using <<END syntax.
+  echo "skip: $1 ["
+  cat -
+  echo "]"
+}
+
 testit () {
        name="$1"
        shift