diff options
author | unknown <serg@sergbook.mysql.com> | 2003-03-29 20:40:03 +0300 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2003-03-29 20:40:03 +0300 |
commit | d2117cbe2fd4b454a03e5588ba731be1fc0a138a (patch) | |
tree | d630bf005775ec8f06785632bfda2f75fa29bc16 /myisam/ftbench/ft-test-run.sh | |
parent | ba5065b80e1cdbbd59b1ac09c5840d903efbb6f1 (diff) | |
download | mariadb-git-d2117cbe2fd4b454a03e5588ba731be1fc0a138a.tar.gz |
ft benchmark suite: initial checkin
BitKeeper/etc/ignore:
Added myisam/ftbench/data myisam/ftbench/t to the ignore list
Diffstat (limited to 'myisam/ftbench/ft-test-run.sh')
-rwxr-xr-x | myisam/ftbench/ft-test-run.sh | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/myisam/ftbench/ft-test-run.sh b/myisam/ftbench/ft-test-run.sh new file mode 100755 index 00000000000..4c81cac6d4f --- /dev/null +++ b/myisam/ftbench/ft-test-run.sh @@ -0,0 +1,81 @@ +#!/bin/sh -x + +if [ ! -x ./ft-test-run.sh ] ; then + echo "Usage: ./ft-test-run.sh" + exit 1 +fi + +BASE=`pwd` +DATA=$BASE/var +ROOT=`cd ../..; pwd` +MYSQLD=$ROOT/sql/mysqld +MYSQL=$ROOT/client/mysql +MYSQLADMIN=$ROOT/client/mysqladmin +SOCK=$DATA/mysql.sock +PID=$DATA/mysql.pid +H=../ftdefs.h +OPTS="--no-defaults --socket=$SOCK --character-sets-dir=$ROOT/sql/share/charsets" + +# --ft_min_word_len=# +# --ft_max_word_len=# +# --ft_max_word_len_for_sort=# +# --ft_stopword_file=name +# --key_buffer_size=# + +stop_myslqd() +{ + [ -S $SOCK ] && $MYSQLADMIN $OPTS shutdown + [ -f $PID ] && kill `cat $PID` && sleep 15 && [ -f $PID ] && kill -9 `cat $PID` +} + +if [ ! -d t/BEST ] ; then + echo "No ./t/BEST directory! Aborting..." + exit 1 +fi +rm -f t/BEST/report.txt +if [ -w $H ] ; then + echo "$H is writeable! Aborting..." + exit 1 +fi + +for batch in t/BEST t/* ; do + A=`ls $batch/*.out` + [ ! -d $batch -o -n "$A" ] && continue + rm -f $H + ln -s $BASE/$batch/ftdefs.h $H + touch $H + OPTS="--defaults-file=$BASE/$batch/my.cnf --socket=$SOCK --character-sets-dir=$ROOT/sql/share/charsets" + stop_myslqd + rm $MYSQLD + (cd $ROOT; gmake) + + for prog in $MYSQLD $MYSQL $MYSQLADMIN ; do + if [ ! -x $prog ] ; then + echo "No $prog" + exit 1 + fi + done + + rm -rf var 2>&1 >/dev/null + mkdir var + mkdir var/test + + $MYSQLD $OPTS --basedir=$BASE --skip-bdb --pid-file=$PID \ + --language=$ROOT/sql/share/english \ + --skip-grant-tables --skip-innodb \ + --skip-networking --tmpdir=$DATA & + + $MYSQLADMIN $OPTS --connect_timeout=60 ping + if [ $? != 0 ] ; then + echo "$MYSQLD refused to start" + exit 1 + fi + for test in `cd data; echo *.test|sed "s/\.test\>//g"` ; do + $MYSQL $OPTS --skip-column-names test <data/$test.test >var/$test.eval + ./Ereport.pl var/$test.eval data/$test.relj > $batch/$test.out || exit + done + stop_myslqd + rm -f $H + [ $batch -ef t/BEST ] || ./Ecompare.pl t/BEST $batch >> t/BEST/report.txt +done + |