mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 21:54:48 +00:00
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:
@@ -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
|
||||
)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user