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

[libvirt] [PATCH 1/2] test-lib: Make case skipping possible



Signed-off-by: Martin Kletzander <mkletzan redhat com>
---
 tests/test-lib.sh | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/test-lib.sh b/tests/test-lib.sh
index 2f79706..e612f8f 100644
--- a/tests/test-lib.sh
+++ b/tests/test-lib.sh
@@ -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
-- 
1.8.3.2


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