render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c401cc
From 09369d4c31cf5b2ef0dc3eab2d2289b5987c9089 Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <09369d4c31cf5b2ef0dc3eab2d2289b5987c9089.1386348946.git.jdenemar@redhat.com>
c401cc
From: Martin Kletzander <mkletzan@redhat.com>
c401cc
Date: Thu, 28 Nov 2013 15:42:53 +0100
c401cc
Subject: [PATCH] test-lib: Make case skipping possible
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1034380
c401cc
c401cc
(cherry picked from commit 38716772d0b9803a0b40d34b80f6b76d4e362c6a)
c401cc
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 tests/test-lib.sh | 18 ++++++++++++++++++
c401cc
 1 file changed, 18 insertions(+)
c401cc
c401cc
diff --git a/tests/test-lib.sh b/tests/test-lib.sh
c401cc
index 918bf73..c55407a 100644
c401cc
--- a/tests/test-lib.sh
c401cc
+++ b/tests/test-lib.sh
c401cc
@@ -23,6 +23,24 @@ test_intro()
c401cc
   fi
c401cc
 }
c401cc
 
c401cc
+test_skip_case()
c401cc
+{
c401cc
+  counter=$1
c401cc
+  name=$2
c401cc
+  reason=$3
c401cc
+  if test "$verbose" = "0" ; then
c401cc
+    mod=`expr \( $counter + 40 - 1 \) % 40`
c401cc
+    if test "$counter" != 1 && test "$mod" = 0 ; then
c401cc
+        printf " %-3d\n" `expr $counter - 1`
c401cc
+        printf "      "
c401cc
+    fi
c401cc
+    printf "_"
c401cc
+  else
c401cc
+    printf "%3d) %-60s ... SKIP\n" "$counter" "$name"
c401cc
+    printf "     case skipped: %s\n" "$reason"
c401cc
+  fi
c401cc
+}
c401cc
+
c401cc
 test_result()
c401cc
 {
c401cc
   counter=$1
c401cc
-- 
c401cc
1.8.4.5
c401cc