3 #-----------------------------------------------------------------------
4 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
5 #-----------------------------------------------------------------------
10 # generic initialization
14 trap "rm -f /tmp/$$.; exit" 0 1 2 3 15
23 echo "Creating the group index ..."
24 cat <<'End-of-File' >group
27 # define groups and default group owners
28 # do not start group name with a digit
35 # test-group association ... one line per test
43 echo "Warning: making the index file \"group\" writeable"
50 echo "Warning: make failed -- some tests may be missing"
53 last=`grep '^[0-9][0-9]* ' group | sort | tail -1 | sed -e 's/[ ].*//'`
54 # get rid of leading 0s as can be interpreted as octal
55 last=`echo $last | sed 's/^0*//'`
56 id=`$AWK_PROG </dev/null 'BEGIN{printf "%03d\n",'$last'+1}'`
57 echo "Next test is $id"
61 echo "Error: test $id already exists!"
66 echo -n "Creating skeletal script for you to edit ..."
68 cat <<End-of-File >$id
74 #-----------------------------------------------------------------------
75 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
76 #-----------------------------------------------------------------------
79 owner=$USER@`_get_fqdn`
82 echo "QA output created by \$seq"
86 status=1 # failure is the default!
87 trap "_cleanup; exit \\\$status" 0 1 2 3 15
95 # get standard environment, filters and checks
99 # real QA test starts here
101 # Modify as appropriate.
102 _supported_fs xfs udf nfs
103 _supported_os IRIX Linux
108 # optional stuff if your test has verbose output to help resolve problems
110 #echo "If failure, check \$seq.full (this) and \$seq.full.ok (reference)"
117 sleep 2 # latency to read messages to this point
127 echo -n "Add to group(s) [other] (? for list): "
129 [ -z "$ans" ] && ans=other
130 if [ "X$ans" = "X?" ]
133 BEGIN { text = "# ???" }
134 /^[a-z]/ { printf "%-16.16s %s\n",$1,text; text = "# ???"; next }
143 # expert mode, groups are on the command line
147 if grep "^$g[ ]" group >/dev/null
151 echo "Warning: group \"$g\" not defined in ./group"
157 echo -n "Adding $id to group index ..."
158 echo "$id $ans" >>group