Skip to content

Commit de428f6

Browse files
author
reggie@big_geek.
committed
Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.0
into big_geek.:C:/Work/mysql/mysql-5.0
2 parents dec2640 + cd05921 commit de428f6

File tree

2 files changed

+39
-21
lines changed

2 files changed

+39
-21
lines changed

Makefile.am

+20-21
Original file line numberDiff line numberDiff line change
@@ -97,36 +97,35 @@ tags:
9797
support-files/build-tags
9898
.PHONY: init-db bin-dist
9999

100-
# Test installation. Ports are configurable from the environment.
101-
102-
MYSQL_TEST_MANAGER_PORT = 9305
103-
MYSQL_TEST_MASTER_PORT = 9306
104-
MYSQL_TEST_SLAVE_PORT = 9308
105-
MYSQL_TEST_NDB_PORT = 9350
106-
MYSQL_TEST_RUN_ARGS = --manager-port=$(MYSQL_TEST_MANAGER_PORT) \
107-
--master_port=$(MYSQL_TEST_MASTER_PORT) \
108-
--slave_port=$(MYSQL_TEST_SLAVE_PORT) \
109-
--ndbcluster_port=$(MYSQL_TEST_NDB_PORT)
100+
# Target 'test' will run the regression test suite using the built server.
101+
#
102+
# If you are running in a shared environment, users can avoid clashing
103+
# port numbers by setting individual small numbers 1-100 to the
104+
# environment variable MTR_BUILD_THREAD. The script "mysql-test-run"
105+
# will then calculate the various port numbers it needs from this,
106+
# making sure each user use different ports.
110107

111108
test:
112109
cd mysql-test ; \
113-
./mysql-test-run $(MYSQL_TEST_RUN_ARGS) && \
114-
./mysql-test-run $(MYSQL_TEST_RUN_ARGS) --ps-protocol
110+
./mysql-test-run && \
111+
./mysql-test-run --ps-protocol
115112

116113
test-force:
117-
cd mysql-test ; \
118-
./mysql-test-run $(MYSQL_TEST_RUN_ARGS) --force ; \
119-
./mysql-test-run $(MYSQL_TEST_RUN_ARGS) --ps-protocol --force
114+
cd mysql-test; \
115+
./mysql-test-run --force ; \
116+
./mysql-test-run --ps-protocol --force
120117

118+
# We are testing a new Perl version of the test script
121119
test-pl:
122-
cd mysql-test ; \
123-
./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) && \
124-
./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --ps-protocol
120+
cd mysql-test; \
121+
./mysql-test-run.pl && \
122+
./mysql-test-run.pl --ps-protocol
125123

126124
test-force-pl:
127-
cd mysql-test ; \
128-
./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --force ; \
129-
./mysql-test-run.pl $(MYSQL_TEST_RUN_ARGS) --ps-protocol --force
125+
cd mysql-test; \
126+
./mysql-test-run.pl --force ; \
127+
./mysql-test-run.pl --ps-protocol --force
130128

131129
# Don't update the files from bitkeeper
132130
%::SCCS/s.%
131+

mysql-test/mysql-test-run.sh

+19
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,25 @@ NDBCLUSTER_PORT=9350
216216
MYSQL_MANAGER_PW_FILE=$MYSQL_TEST_DIR/var/tmp/manager.pwd
217217
MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
218218
MYSQL_MANAGER_USER=root
219+
220+
#
221+
# To make it easier for different devs to work on the same host,
222+
# an environment variable can be used to control all ports. A small
223+
# number is to be used, 0 - 16 or similar.
224+
#
225+
if [ -n "$MTR_BUILD_THREAD" ] ; then
226+
MASTER_MYPORT=`expr $MTR_BUILD_THREAD '*' 40 + 8120`
227+
MYSQL_MANAGER_PORT=`expr $MASTER_MYPORT + 2`
228+
SLAVE_MYPORT=`expr $MASTER_MYPORT + 16`
229+
NDBCLUSTER_PORT=`expr $MASTER_MYPORT + 24`
230+
231+
echo "Using MTR_BUILD_THREAD = $MTR_BUILD_THREAD"
232+
echo "Using MASTER_MYPORT = $MASTER_MYPORT"
233+
echo "Using MYSQL_MANAGER_PORT = $MYSQL_MANAGER_PORT"
234+
echo "Using SLAVE_MYPORT = $SLAVE_MYPORT"
235+
echo "Using NDBCLUSTER_PORT = $NDBCLUSTER_PORT"
236+
fi
237+
219238
NO_SLAVE=0
220239
USER_TEST=
221240
FAILED_CASES=

0 commit comments

Comments
 (0)