3 #-----------------------------------------------------------------------
4 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will 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 to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 # Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
21 # Mountain View, CA 94043, USA, or: http://www.sgi.com
22 #-----------------------------------------------------------------------
28 # generic initialization
32 trap "rm -f /tmp/$$.; exit" 0 1 2 3 15
41 echo "Creating the group index ..."
42 cat <<'End-of-File' >group
45 # define groups and default group owners
46 # do not start group name with a digit
53 # test-group association ... one line per test
61 echo "Warning: making the index file \"group\" writeable"
68 echo "Warning: make failed -- some tests may be missing"
71 last=`grep '^[0-9][0-9]* ' group | sort | tail -1 | sed -e 's/[ ].*//'`
72 # get rid of leading 0s as can be interpreted as octal
73 last=`echo $last | sed 's/^0*//'`
74 id=`$AWK_PROG </dev/null 'BEGIN{printf "%03d\n",'$last'+1}'`
75 echo "Next test is $id"
79 echo "Error: test $id already exists!"
84 echo -n "Creating skeletal script for you to edit ..."
86 cat <<End-of-File >$id
92 #-----------------------------------------------------------------------
93 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
95 # This program is free software; you can redistribute it and/or modify it
96 # under the terms of version 2 of the GNU General Public License as
97 # published by the Free Software Foundation.
99 # This program is distributed in the hope that it would be useful, but
100 # WITHOUT ANY WARRANTY; without even the implied warranty of
101 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
103 # Further, this software is distributed without any warranty that it is
104 # free of the rightful claim of any third person regarding infringement
105 # or the like. Any license provided herein, whether implied or
106 # otherwise, applies only to this software file. Patent licenses, if
107 # any, provided herein do not apply to combinations of this program with
108 # other software, or any other product whatsoever.
110 # You should have received a copy of the GNU General Public License along
111 # with this program; if not, write the Free Software Foundation, Inc., 59
112 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
114 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
115 # Mountain View, CA 94043, or:
119 # For further information regarding this notice, see:
121 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
122 #-----------------------------------------------------------------------
125 owner=$USER@`_get_fqdn`
128 echo "QA output created by \$seq"
132 status=1 # failure is the default!
133 trap "_cleanup; exit \\\$status" 0 1 2 3 15
141 # get standard environment, filters and checks
145 # real QA test starts here
147 # Modify as appropriate.
148 _supported_fs xfs udf nfs
149 _supported_os IRIX Linux
154 # optional stuff if your test has verbose output to help resolve problems
156 #echo "If failure, check \$seq.full (this) and \$seq.full.ok (reference)"
163 sleep 2 # latency to read messages to this point
173 echo -n "Add to group(s) [other] (? for list): "
175 [ -z "$ans" ] && ans=other
176 if [ "X$ans" = "X?" ]
179 BEGIN { text = "# ???" }
180 /^[a-zA-z]/ { printf "%-16.16s %s\n",$1,text; text = "# ???"; next }
189 # expert mode, groups are on the command line
193 if grep "^$g[ ]" group >/dev/null
197 echo "Warning: group \"$g\" not defined in ./group"
203 echo -n "Adding $id to group index ..."
204 echo "$id $ans" >>group