From 353859558a34648e4c5dd1dc67dc450d2473ca31 Mon Sep 17 00:00:00 2001 From: dmitry_yus Date: Sat, 30 Apr 2005 16:56:30 +0000 Subject: flexible test-range for regression in form of parameter [start[:end]] git-svn-id: svn://svn.berlios.de/open-iscsi@263 d7303112-9cec-0310-bdd2-e83a94d6c2b6 --- test/regression.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/regression.sh b/test/regression.sh index 60c9676..d82d247 100755 --- a/test/regression.sh +++ b/test/regression.sh @@ -77,7 +77,7 @@ function disktest_run() { function fatal() { echo "regression.sh: $1" - echo "Usage: regression.sh [test#] [bsize]" + echo "Usage: regression.sh [test#[:#]] [bsize]" exit 1 } @@ -94,6 +94,11 @@ device=$2 test x$3 != x && begin=$3 test x$4 != x && bsize=$4 +if test x$begin != x; then + end=`echo $begin | awk -F: '{print $2}'` + begin=`echo $begin | awk -F: '{print $1}'` +fi + printf " BIG FAT WARNING! @@ -115,9 +120,14 @@ cat regression.dat | while read line; do if echo $line | grep "^#" >/dev/null; then continue; fi if echo $line | grep "^$" >/dev/null; then continue; fi if test x$begin != x; then - if test x$begin != x$i; then + if test x$begin != x$i -a x$end = x; then let i=i+1 continue + elif test x$begin != x -a x$end != x; then + if test $i -lt $begin -o $i -gt $end; then + let i=i+1 + continue + fi fi fi imm_data_en=`echo $line | awk '/^[YesNo]+/ {print $1}'` -- cgit v1.2.1