3
if [ ! -x ./ft-test-run.sh ] ; then
4
echo "Usage: ./ft-test-run.sh"
11
MYSQLD=$ROOT/sql/mysqld
12
MYSQL=$ROOT/client/mysql
13
MYSQLADMIN=$ROOT/client/mysqladmin
17
OPTS="--no-defaults --socket=$SOCK --character-sets-dir=$ROOT/sql/share/charsets"
22
[ -S $SOCK ] && $MYSQLADMIN $OPTS shutdown
23
[ -f $PID ] && kill `cat $PID` && sleep 15 && [ -f $PID ] && kill -9 `cat $PID`
26
if [ ! -d t/BEST ] ; then
27
echo "No ./t/BEST directory! Aborting..."
30
rm -f t/BEST/report.txt
32
echo "$H is writeable! Aborting..."
37
rm -rf var > /dev/null 2>&1
42
[ ! -d $batch ] && continue
43
[ $batch -ef t/BEST -a $batch != t/BEST ] && continue
45
rm -rf var/test/* > /dev/null 2>&1
47
if [ -f $BASE/$batch/ftdefs.h ] ; then
48
cat $BASE/$batch/ftdefs.h > $H
53
OPTS="--defaults-file=$BASE/$batch/my.cnf --socket=$SOCK --character-sets-dir=$ROOT/sql/share/charsets"
56
echo "building $batch"
57
echo "============== $batch ===============" >> var/ft_test.log
58
(cd $ROOT; gmake) >> var/ft_test.log 2>&1
60
for prog in $MYSQLD $MYSQL $MYSQLADMIN ; do
61
if [ ! -x $prog ] ; then
62
echo "build failed: no $prog"
67
echo "=====================================" >> var/ft_test.log
68
$MYSQLD $OPTS --basedir=$BASE --pid-file=$PID \
69
--language=$ROOT/sql/share/english \
70
--skip-grant-tables --skip-innodb \
71
--skip-networking --tmpdir=$DATA >> var/ft_test.log 2>&1 &
74
$MYSQLADMIN $OPTS ping
76
echo "$MYSQLD refused to start"
79
for test in `cd data; echo *.r|sed "s/\.r//g"` ; do
80
if [ -f $batch/$test.out ] ; then
81
echo "skipping $batch/$test.out"
84
echo "testing $batch/$test"
85
FT_MODE=`cat $batch/ft_mode 2>/dev/null`
86
./Ecreate.pl $test "$FT_MODE" | $MYSQL $OPTS --skip-column-names test >var/$test.eval
87
echo "reporting $batch/$test"
88
./Ereport.pl var/$test.eval data/$test.r > $batch/$test.out || exit
93
if [ ! $batch -ef t/BEST ] ; then
94
echo "comparing $batch"
95
./Ecompare.pl t/BEST $batch >> t/BEST/report.txt