3 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of version 2 of the GNU General Public License as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it would be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 # Further, this software is distributed without any warranty that it is
14 # free of the rightful claim of any third person regarding infringement
15 # or the like. Any license provided herein, whether implied or
16 # otherwise, applies only to this software file. Patent licenses, if
17 # any, provided herein do not apply to combinations of this program with
18 # other software, or any other product whatsoever.
20 # You should have received a copy of the GNU General Public License along
21 # with this program; if not, write the Free Software Foundation, Inc., 59
22 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
24 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
25 # Mountain View, CA 94043, or:
29 # For further information regarding this notice, see:
31 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
36 # $Header: /build2/depot/linux/pcp/dev/qa/RCS/new,v 2.22 1999/10/06 19:16:53 kenmcd Exp $
39 # generic initialization
43 trap "rm -f /tmp/$$.; exit" 0 1 2 3 15
52 echo "Creating the group index ..."
53 cat <<'End-of-File' >group
56 # $Id: new,v 2.22 1999/10/06 19:16:53 kenmcd Exp $
58 # define groups and default group owners
59 # do not start group name with a digit
66 # test-group association ... one line per test
74 echo "Warning: making the index file \"group\" writeable"
81 echo "Warning: make failed -- some tests may be missing"
84 last=`grep '^[0-9][0-9]* ' group | sort | tail -1 | sed -e 's/[ ].*//'`
85 # get rid of leading 0s as can be interpreted as octal
86 last=`echo $last | sed 's/^0*//'`
87 id=`$AWK_PROG </dev/null 'BEGIN{printf "%03d\n",'$last'+1}'`
88 echo "Next test is $id"
92 echo "Error: test $id already exists!"
97 echo -n "Creating skeletal script for you to edit ..."
99 cat <<End-of-File | sed -e '/rcsId/s//Id: 1.1 /' >$id
101 # XFS QA Test No. $id
104 # what am I here for?
106 #-----------------------------------------------------------------------
107 # Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
109 # This program is free software; you can redistribute it and/or modify it
110 # under the terms of version 2 of the GNU General Public License as
111 # published by the Free Software Foundation.
113 # This program is distributed in the hope that it would be useful, but
114 # WITHOUT ANY WARRANTY; without even the implied warranty of
115 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
117 # Further, this software is distributed without any warranty that it is
118 # free of the rightful claim of any third person regarding infringement
119 # or the like. Any license provided herein, whether implied or
120 # otherwise, applies only to this software file. Patent licenses, if
121 # any, provided herein do not apply to combinations of this program with
122 # other software, or any other product whatsoever.
124 # You should have received a copy of the GNU General Public License along
125 # with this program; if not, write the Free Software Foundation, Inc., 59
126 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
128 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
129 # Mountain View, CA 94043, or:
133 # For further information regarding this notice, see:
135 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
136 #-----------------------------------------------------------------------
139 owner=$USER@`_get_fqdn`
142 echo "QA output created by \$seq"
146 status=1 # failure is the default!
147 trap "rm -f \$tmp.*; exit \\\$status" 0 1 2 3 15
149 # get standard environment, filters and checks
153 # real QA test starts here
158 # optional stuff if your test has verbose output to help resolve problems
160 #echo "If failure, check \$seq.full (this) and \$seq.full.ok (reference)"
167 sleep 2 # latency to read messages to this point
177 echo -n "Add to group(s) [other] (? for list): "
179 [ -z "$ans" ] && ans=other
180 if [ "X$ans" = "X?" ]
183 BEGIN { text = "# ???" }
184 /^[a-zA-z]/ { printf "%-16.16s %s\n",$1,text; text = "# ???"; next }
193 # expert mode, groups are on the command line
197 if grep "^$g[ ]" group >/dev/null
201 echo "Warning: group \"$g\" not defined in ./group"
207 echo -n "Adding $id to group index ..."
208 echo "$id $ans" >>group