From 09369d4c31cf5b2ef0dc3eab2d2289b5987c9089 Mon Sep 17 00:00:00 2001 Message-Id: <09369d4c31cf5b2ef0dc3eab2d2289b5987c9089.1386348946.git.jdenemar@redhat.com> From: Martin Kletzander Date: Thu, 28 Nov 2013 15:42:53 +0100 Subject: [PATCH] test-lib: Make case skipping possible https://bugzilla.redhat.com/show_bug.cgi?id=1034380 (cherry picked from commit 38716772d0b9803a0b40d34b80f6b76d4e362c6a) Signed-off-by: Martin Kletzander Signed-off-by: Jiri Denemark --- tests/test-lib.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 918bf73..c55407a 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -23,6 +23,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.4.5