@@ -29,15 +29,15 @@ trap "rm -f /tmp/$$.; exit" 0 1 2 3 15
_cleanup()
{
- :
+ :
}
SRC_GROUPS=`find tests -not -path tests -type d -printf "%f "`
usage()
{
- echo "Usage $0 test_dir"
- echo "Available dirs are: $SRC_GROUPS"
- exit
+ echo "Usage $0 test_dir"
+ echo "Available dirs are: $SRC_GROUPS"
+ exit
}
[ $# -eq 0 ] && usage
@@ -46,8 +46,8 @@ shift
if [ ! -f $tdir/group ]
then
- echo "Creating the $tdir/group index ..."
- cat <<'End-of-File' >$tdir/group
+ echo "Creating the $tdir/group index ..."
+ cat <<'End-of-File' >$tdir/group
# QA groups control
#
# define groups and default group owners
@@ -65,15 +65,15 @@ fi
if [ ! -w $tdir/group ]
then
- chmod u+w $tdir/group
- echo "Warning: making the index file \"$tdir/group\" writeable"
+ chmod u+w $tdir/group
+ echo "Warning: making the index file \"$tdir/group\" writeable"
fi
if make
then
- :
+ :
else
- echo "Warning: make failed -- some tests may be missing"
+ echo "Warning: make failed -- some tests may be missing"
fi
i=0
@@ -83,16 +83,16 @@ eof=1
for found in `cat $tdir/group | $AWK_PROG '{ print $1 }'`
do
- line=$((line+1))
- if [ -z "$found" ] || [ "$found" == "#" ];then
+ line=$((line+1))
+ if [ -z "$found" ] || [ "$found" == "#" ];then
continue
- fi
- i=$((i+1))
- id=`printf "%03d" $i`
- if [ "$id" != "$found" ];then
+ fi
+ i=$((i+1))
+ id=`printf "%03d" $i`
+ if [ "$id" != "$found" ];then
eof=0
break
- fi
+ fi
done
if [ $eof -eq 1 ]; then
line=$((line+1))
@@ -104,9 +104,9 @@ echo "Next test is $id"
if [ -f $tdir/$id ]
then
- echo "Error: test $id already exists!"
- _cleanup
- exit 1
+ echo "Error: test $id already exists!"
+ _cleanup
+ exit 1
fi
echo -n "Creating skeletal script for you to edit ..."
@@ -148,8 +148,8 @@ trap "_cleanup; exit \\\$status" 0 1 2 3 15
_cleanup()
{
- cd /
- rm -f \$tmp.*
+ cd /
+ rm -f \$tmp.*
}
# get standard environment, filters and checks
@@ -184,39 +184,39 @@ ${EDITOR-vi} $tdir/$id
if [ $# -eq 0 ]
then
- while true
- do
+ while true
+ do
echo -n "Add to group(s) [other] (? for list): "
read ans
[ -z "$ans" ] && ans=other
if [ "X$ans" = "X?" ]
then
- for d in $SRC_GROUPS; do
+ for d in $SRC_GROUPS; do
l=$(sed -n < tests/$d/group \
- -e 's/#.*//' \
- -e 's/$/ /' \
- -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p')
+ -e 's/#.*//' \
+ -e 's/$/ /' \
+ -e 's;\(^[0-9][0-9][0-9]\)\(.*$\);\2;p')
grpl="$grpl $l"
- done
- lst=`for word in $grpl; do echo $word; done | sort| uniq `
- echo $lst
+ done
+ lst=`for word in $grpl; do echo $word; done | sort| uniq `
+ echo $lst
else
- break
+ break
fi
- done
+ done
else
- # expert mode, groups are on the command line
- #
- for g in $*
- do
+ # expert mode, groups are on the command line
+ #
+ for g in $*
+ do
if grep "^$g[ ]" $tdir/group >/dev/null
then
- :
+ :
else
- echo "Warning: group \"$g\" not defined in $tdir/group"
+ echo "Warning: group \"$g\" not defined in $tdir/group"
fi
- done
- ans="$*"
+ done
+ ans="$*"
fi
>