Fix pt-heartbeat/pxc.t. Exit early in test-env if wget fails. Add APP=FORK|mysql to start-sandbox so it too works around the pxc mysqld -V bug; add FORK=pxc to start_sandbox() calls.

This commit is contained in:
Daniel Nichter
2013-03-08 10:07:05 -08:00
parent f2187d0e83
commit e5e6b1d9b9
7 changed files with 50 additions and 38 deletions

View File

@@ -61,7 +61,8 @@ fi
if [ -z "$MYSQL_BASE_DIR" ]; then
(
cd $MYSQL_BIN_DIR
wget -q -O mysql.tar.gz http://hackmysql.com/barebones/$APP/$MYSQL/$ARCH
wget -q -O mysql.tar.gz http://hackmysql.com/barebones/$APP/$MYSQL/$ARCH \
|| exit 1
tar xvfz mysql.tar.gz
rm mysql.tar.gz
)

View File

@@ -223,12 +223,16 @@ elif [ -x "$PERCONA_TOOLKIT_SANDBOX/libexec/mysqld" ]; then
else
die "Cannot find executable mysqld in $PERCONA_TOOLKIT_SANDBOX/bin, $PERCONA_TOOLKIT_SANDBOX/sbin or $PERCONA_TOOLKIT_SANDBOX/libexec."
fi
if [ $type != "cluster" ]; then
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
else
APP="${FORK:-"mysql"}"
if [ $type = "cluster" -o $APP = "pxc" ]; then
ip=$(perl -MNet::Address::IP::Local -le 'print Net::Address::IP::Local->public')
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V --bind-address $ip 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
else
version=`$PERCONA_TOOLKIT_SANDBOX/$mysqld -V 2>/dev/null | awk '{print $3}' | cut -d. -f 1,2`;
fi
if [ ! -d "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/$version" ]; then
die "$PERCONA_TOOLKIT_BRANCH/sandbox/servers/$version does not exist."
fi