2004-12-21 21:02:47 +00:00
|
|
|
This patch is needed to improve the probability that the MySQL tests pass
|
|
|
|
in Red Hat's build environment. The 32-bit and 64-bit variants of a single
|
|
|
|
architecture may be built on the same machine at the same time, so we have
|
2006-06-09 04:11:59 +00:00
|
|
|
to ensure that the tests use different port numbers on each arch, else they
|
2006-06-10 17:43:55 +00:00
|
|
|
will interfere with each other. Also, it's been observed that sometimes
|
|
|
|
the build environment fails to kill a test mysql daemon when a build is
|
|
|
|
stopped early due to build failure on another machine. To ensure subsequent
|
|
|
|
tests can succeed, kill off any such daemons.
|
2004-12-21 21:02:47 +00:00
|
|
|
|
2005-11-03 04:05:15 +00:00
|
|
|
We also have to hack the top-level Makefile to enable the openssl regression
|
|
|
|
tests. (Why doesn't this happen automatically given the configure option??)
|
2004-12-21 21:02:47 +00:00
|
|
|
|
2005-11-03 04:05:15 +00:00
|
|
|
Note: keep an eye on which version of "mysql-test-run" gets invoked by
|
|
|
|
the "make test" target. In the 4.1 branch this is now defaulting to the
|
|
|
|
perl script, but 5.0 is not (yet?) doing that; they also seem to be fooling
|
|
|
|
with a C-code version. Besides this patch, mysql-libtool.patch
|
|
|
|
would need to be changed to use either one.
|
|
|
|
|
|
|
|
|
2006-06-09 04:11:59 +00:00
|
|
|
diff -Naur mysql-5.0.22.orig/Makefile.am mysql-5.0.22/Makefile.am
|
|
|
|
--- mysql-5.0.22.orig/Makefile.am 2006-05-25 04:56:41.000000000 -0400
|
2006-06-10 17:43:55 +00:00
|
|
|
+++ mysql-5.0.22/Makefile.am 2006-06-10 13:13:34.000000000 -0400
|
2006-06-09 04:11:59 +00:00
|
|
|
@@ -106,8 +106,8 @@
|
2005-11-03 04:05:15 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
cd mysql-test ; \
|
2005-12-10 05:13:43 +00:00
|
|
|
- ./mysql-test-run && \
|
|
|
|
- ./mysql-test-run --ps-protocol
|
|
|
|
+ ./mysql-test-run --with-openssl && \
|
|
|
|
+ ./mysql-test-run --ps-protocol --with-openssl
|
2004-12-21 21:02:47 +00:00
|
|
|
|
2005-12-10 05:13:43 +00:00
|
|
|
test-force:
|
|
|
|
cd mysql-test; \
|
2006-06-09 04:11:59 +00:00
|
|
|
diff -Naur mysql-5.0.22.orig/mysql-test/mysql-test-run.sh mysql-5.0.22/mysql-test/mysql-test-run.sh
|
|
|
|
--- mysql-5.0.22.orig/mysql-test/mysql-test-run.sh 2006-05-25 04:56:49.000000000 -0400
|
2006-06-10 17:43:55 +00:00
|
|
|
+++ mysql-5.0.22/mysql-test/mysql-test-run.sh 2006-06-10 13:36:32.000000000 -0400
|
|
|
|
@@ -252,6 +252,16 @@
|
2006-06-09 04:11:59 +00:00
|
|
|
# 5.1 test run, even if different MTR_BUILD_THREAD is used. This means
|
|
|
|
# all port numbers might not be used in this version of the script.
|
2005-12-10 05:13:43 +00:00
|
|
|
#
|
2004-12-21 21:02:47 +00:00
|
|
|
+# hack to allow 32- and 64-bit tests to run concurrently on same build machine
|
|
|
|
+case `uname -m` in
|
2006-06-10 17:43:55 +00:00
|
|
|
+ ppc64 | s390x | x86_64)
|
|
|
|
+ MTR_BUILD_THREAD=7
|
2004-12-21 21:02:47 +00:00
|
|
|
+ ;;
|
|
|
|
+ *)
|
2006-06-10 17:43:55 +00:00
|
|
|
+ MTR_BUILD_THREAD=11
|
2004-12-21 21:02:47 +00:00
|
|
|
+ ;;
|
|
|
|
+esac
|
2005-12-10 05:13:43 +00:00
|
|
|
+
|
|
|
|
if [ -n "$MTR_BUILD_THREAD" ] ; then
|
2006-06-09 04:11:59 +00:00
|
|
|
MASTER_MYPORT=`expr $MTR_BUILD_THREAD '*' 10 + 10000`
|
2005-12-10 05:13:43 +00:00
|
|
|
MYSQL_MANAGER_PORT=`expr $MASTER_MYPORT + 2`
|
2006-06-10 17:43:55 +00:00
|
|
|
@@ -265,6 +275,14 @@
|
|
|
|
echo "Using NDBCLUSTER_PORT = $NDBCLUSTER_PORT"
|
|
|
|
fi
|
|
|
|
|
|
|
|
+#
|
|
|
|
+# If a previous build attempt failed it's possible that mysql daemons
|
|
|
|
+# launched by previous run of this script are still hanging around.
|
|
|
|
+# Kill 'em so we can re-use the ports.
|
|
|
|
+#
|
|
|
|
+ps auxww | grep "/sql/mysqld .*port=$MASTER_MYPORT" | awk '{print $2}' | xargs kill
|
|
|
|
+ps auxww | grep "/sql/mysqld .*port=$SLAVE_MYPORT" | awk '{print $2}' | xargs kill
|
|
|
|
+
|
|
|
|
NO_SLAVE=0
|
|
|
|
USER_TEST=
|
|
|
|
FAILED_CASES=
|