3 #-----------------------------------------------------------------------
4 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation.
10 # This program is distributed in the hope that it would be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #-----------------------------------------------------------------------
24 # generic initialization
28 trap "rm -f /tmp/$$.; exit" 0 1 2 3 15
37 echo "Creating the group index ..."
38 cat <<'End-of-File' >group
41 # define groups and default group owners
42 # do not start group name with a digit
49 # test-group association ... one line per test
57 echo "Warning: making the index file \"group\" writeable"
64 echo "Warning: make failed -- some tests may be missing"
67 last=`grep '^[0-9][0-9]* ' group | sort | tail -1 | sed -e 's/[ ].*//'`
68 # get rid of leading 0s as can be interpreted as octal
69 last=`echo $last | sed 's/^0*//'`
70 id=`$AWK_PROG </dev/null 'BEGIN{printf "%03d\n",'$last'+1}'`
71 echo "Next test is $id"
75 echo "Error: test $id already exists!"
80 echo -n "Creating skeletal script for you to edit ..."
84 cat <<End-of-File >$id
90 #-----------------------------------------------------------------------
91 # Copyright (c) $year YOUR NAME HERE. All Rights Reserved.
93 # This program is free software; you can redistribute it and/or
94 # modify it under the terms of the GNU General Public License as
95 # published by the Free Software Foundation.
97 # This program is distributed in the hope that it would be useful,
98 # but WITHOUT ANY WARRANTY; without even the implied warranty of
99 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
100 # GNU General Public License for more details.
102 # You should have received a copy of the GNU General Public License
103 # along with this program; if not, write the Free Software Foundation,
104 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
105 #-----------------------------------------------------------------------
109 seqres=\$RESULT_DIR/\$seq
110 echo "QA output created by \$seq"
114 status=1 # failure is the default!
115 trap "_cleanup; exit \\\$status" 0 1 2 3 15
123 # get standard environment, filters and checks
127 # real QA test starts here
129 # Modify as appropriate.
130 _supported_fs generic
131 _supported_os IRIX Linux
137 # optional stuff if your test has verbose output to help resolve problems
139 #echo "If failure, check \$seqres.full (this) and \$seqres.full.ok (reference)"
146 sleep 2 # latency to read messages to this point
156 echo -n "Add to group(s) [other] (? for list): "
158 [ -z "$ans" ] && ans=other
159 if [ "X$ans" = "X?" ]
162 BEGIN { text = "# ???" }
163 /^[a-z]/ { printf "%-16.16s %s\n",$1,text; text = "# ???"; next }
172 # expert mode, groups are on the command line
176 if grep "^$g[ ]" group >/dev/null
180 echo "Warning: group \"$g\" not defined in ./group"
186 echo -n "Adding $id to group index ..."
187 echo "$id $ans" >>group