]> xenbits.xensource.com Git - libvirt.git/commitdiff
test-lib: Make case skipping possible
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 12 Sep 2013 10:12:23 +0000 (12:12 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 13 Sep 2013 08:25:56 +0000 (10:25 +0200)
tests/test-lib.sh

index 2f79706b690dd1747ba87588427ed1c3d7b2aa17..e612f8f215c2239e07891c9d59155d9cfbae2618 100644 (file)
@@ -41,6 +41,24 @@ test_intro()
   fi
 }
 
+test_skip_case()
+{
+  counter=$1
+  name=$2
+  reason=$3
+  if test "$verbose" = "0" ; then
+    mod=`expr \( $counter + 40 - 1 \) % 40`
+    if test "$counter" != 1 && test "$mod" = 0 ; then
+        printf " %-3d\n" `expr $counter - 1`
+        printf "      "
+    fi
+    printf "_"
+  else
+    printf "%3d) %-60s ... SKIP\n" "$counter" "$name"
+    printf "     case skipped: %s\n" "$reason"
+  fi
+}
+
 test_result()
 {
   counter=$1