82 lines
3.2 KiB
Diff
82 lines
3.2 KiB
Diff
mysql's idea of a suitable place to install the regression tests is
|
|
/usr/mysql-test. To relocate this to a reasonably FHS-compliant place
|
|
like /usr/share/mysql-test, we have to hack up the paths in install_test_db
|
|
and mysql-test-run. This patch also improves the documentation a tad.
|
|
|
|
|
|
diff -Naur mysql-5.0.18.orig/mysql-test/README mysql-5.0.18/mysql-test/README
|
|
--- mysql-5.0.18.orig/mysql-test/README 2005-12-21 14:39:48.000000000 -0500
|
|
+++ mysql-5.0.18/mysql-test/README 2006-03-09 20:29:24.000000000 -0500
|
|
@@ -2,11 +2,20 @@
|
|
the currently existing test cases, simply execute ./mysql-test-run in
|
|
this directory. It will fire up the newly built mysqld and test it.
|
|
|
|
+For use in Red Hat distributions, you should run the script as user mysql,
|
|
+so the best bet is something like
|
|
+ cd /usr/share/mysql-test
|
|
+ sudo -u mysql ./mysql-test-run
|
|
+This will use the installed mysql executables, but will run a private copy
|
|
+of the server process (using data files within /usr/share/mysql-test),
|
|
+so you need not start the mysqld service beforehand.
|
|
+
|
|
If you want to run a test with a running MySQL server use the --extern
|
|
option to mysql-test-run. Please note that in this mode the test suite
|
|
expects user to specify test names to run. Otherwise it falls back to the
|
|
-normal "non-extern" behaviour. The reason is that some tests
|
|
-could not run with external server. Here is the sample command
|
|
+normal "non-extern" behaviour. The reason is that many tests
|
|
+will fail with external server (because they need to control the options
|
|
+with which the server is started). Here is the sample command
|
|
to test "alias" and "analyze" tests on external server:
|
|
|
|
mysql-test-run --extern alias analyze
|
|
diff -Naur mysql-5.0.18.orig/mysql-test/install_test_db.sh mysql-5.0.18/mysql-test/install_test_db.sh
|
|
--- mysql-5.0.18.orig/mysql-test/install_test_db.sh 2005-12-21 14:39:48.000000000 -0500
|
|
+++ mysql-5.0.18/mysql-test/install_test_db.sh 2006-03-09 20:20:45.000000000 -0500
|
|
@@ -9,17 +9,17 @@
|
|
shift 1
|
|
|
|
# Check if it's a binary distribution or a 'make install'
|
|
- if test -x ../libexec/mysqld
|
|
+ if test -x /usr/libexec/mysqld
|
|
then
|
|
- execdir=../libexec
|
|
+ execdir=/usr/libexec
|
|
else
|
|
- execdir=../bin
|
|
+ execdir=/usr/bin
|
|
fi
|
|
- bindir=../bin
|
|
+ bindir=/usr/bin
|
|
BINARY_DIST=1
|
|
fix_bin=mysql-test
|
|
- scriptdir=../bin
|
|
- libexecdir=../libexec
|
|
+ scriptdir=/usr/bin
|
|
+ libexecdir=/usr/libexec
|
|
else
|
|
execdir=../sql
|
|
bindir=../client
|
|
@@ -75,7 +75,8 @@
|
|
|
|
#for error messages
|
|
if [ x$BINARY_DIST = x1 ] ; then
|
|
-basedir=..
|
|
+basedir=/usr/share
|
|
+EXTRA_ARG="--language=/usr/share/mysql/english/ --character-sets-dir=/usr/share/mysql/charsets/"
|
|
else
|
|
basedir=.
|
|
EXTRA_ARG="--language=../sql/share/english/ --character-sets-dir=../sql/share/charsets/"
|
|
diff -Naur mysql-5.0.18.orig/mysql-test/mysql-test-run.sh mysql-5.0.18/mysql-test/mysql-test-run.sh
|
|
--- mysql-5.0.18.orig/mysql-test/mysql-test-run.sh 2005-12-21 14:39:59.000000000 -0500
|
|
+++ mysql-5.0.18/mysql-test/mysql-test-run.sh 2006-03-09 20:20:45.000000000 -0500
|
|
@@ -693,6 +693,8 @@
|
|
# currently all binaries are in "bin", for a MySQL AB packaging
|
|
# some are in "tests".
|
|
|
|
+ BASEDIR="/usr"
|
|
+
|
|
if test -x "$BASEDIR/libexec/mysqld"
|
|
then
|
|
MYSQLD="$VALGRIND $BASEDIR/libexec/mysqld"
|