blob: 44c339b0d46bbd54faea0f096c1f00570a65a2f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/sh
TESTFILES="Makefile.am scanner.l parser.y .cvsignore test.input"
if [ ! $# -eq 1 ] ; then
exit 1
fi
if test -e "$1" ; then
echo "$1 exists already"
exit 1
fi
mkdir $1
if test "$?" -ne 0 ; then
echo "mkdir $1 failed"
exit 1
fi
for i in $TESTFILES ; do
cp TEMPLATE/$i $1/$i
done
# Modify .cvsignore
echo "$1" >> "$1"/.cvsignore
# Modify top-level configure.in
sed '/--new-test-here--/i\
tests/'"$1"'/Makefile' < ../configure.in > configure.in.tmp
mv configure.in.tmp ../configure.in
# Modify Makefile.am
sed '/^SUBDIRS/a\
'"$1"' \\' < Makefile.am > Makefile.am.tmp
mv Makefile.am.tmp Makefile.am
# Modify new-test/Makefile.am
sed "s:TEMPLATE:$1:g" < "$1"/Makefile.am > "$1"/Makefile.am.tmp
mv "$1"/Makefile.am.tmp "$1"/Makefile.am
|