# Copyright (C) 2001, 2006 MySQL AB
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
# This is slapped together as a quick way to run the tests and
# is not meant for prime time. Please hack at it and submit
# changes, though, so we can gradually turn it into something
# that will run on all platforms (or incorporate it into the
# standard mysql-test-run).
# All paths below must be relative to $test_data_dir
top_builddir=../..
mysql_test_dir=$top_builddir/mysql-test
examples=$top_builddir/libmysqld/examples
mysqltest=$examples/mysqltest_embedded
datadir=$mysql_test_dir/var/master-data
test_data_dir=test
gdb=0
list=0
run=
tests=
start=
clean=1
-C | --noclean Do not remove old innodb and bdb files at start.
-g | --gdb run $mysqltest in gdb
-h | --help show this help
-l | --list ) list all available tests
-r | --run automatically 'run' program in gdb
-s t | --start=t start with test t (skip all tests before t)
EOF
}
init_args="--server-arg=--language=$top_builddir/sql/share/english" while test $# -gt 0 do
arg=
argset=0 case"$1" in
--?*=* ) arg=`echo "$1" | sed -e 's,^[^=][^=]*=,,'`; argset=1 ;;
esac
if test ! -d "$datadir/$test_data_dir"
then
echo "bad setup (is '$datadir/$test_data_dir'', missing ?)" >&2
exit 1
fi
test -n "$tests" ||
tests=`/bin/ls -1"$mysql_test_dir"/t/*.test | grep -v '^.*/rpl[^/]*$' | \
sed -e 's,^.*/,,' -e 's,.test$,,'`
echo "cleaning data directory '$datadir/$test_data_dir'" if test $clean = 1
then
rm -f $datadir/ib_* $datadir/ibdata*
rm -f $datadir/log.00*
rm -f $datadir/test/*.db fi rm-f$datadir/../tmp/* rm-ftest-gdbinit
forbin$tests do test$list-eq1&&{echo"$b";continue;} test$skip-eq1&&test-n"$start"&&test"$start"="$b"&&skip=0 test$skip-eq1&&{echo"skipping'$b'";continue;}
t="t/$b.test" r="r/$b.result"
#Onlytestif$texists;thereisno$rforsometests test-f$mysql_test_dir/$t||{ echo"test'$mysql_test_dir/$t'doesn'texist">&2 continue } args="$init_args-v--basedir=$mysql_test_dir/-R$r-x$t--server-arg=--datadir=$datadir" iftest-f"$mysql_test_dir/t/$b-master.opt";then args="$args--server-file=t/$b-master.opt" fi
args="$args$test_data_dir"#Adddatabaselast echo"setargs$args$run">test-gdbinit #iffalse&&test-n"$run" iftest-n"$run"-o$gdb-eq1 then echo-e"$er>>>$b" else echo-e"$er>>>$b>\c" readjunk fi iftest$gdb-eq1 then if[-x"$top_builddir/libtool"];then $top_builddir/libtoolgdb-xtest-gdbinit-q$mysqltest else gdb-xtest-gdbinit-q$mysqltest fi res=$? rm-ftest-gdbinit else $mysqltest$args res=$? fi
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.