2018-02-11 13:33:40 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2018-02-11 14:33:39 +02:00
|
|
|
whoami
|
|
|
|
|
2018-02-11 14:06:09 +02:00
|
|
|
[ -d "gh-ost-ci-env" ] || git clone https://github.com/github/gh-ost-ci-env.git
|
2018-02-11 14:05:05 +02:00
|
|
|
|
2018-02-11 14:15:38 +02:00
|
|
|
find sandboxes -name "stop_all" || :
|
|
|
|
|
2018-02-11 14:05:05 +02:00
|
|
|
mkdir -p sandbox/binary
|
2018-02-11 14:10:53 +02:00
|
|
|
rm -rf sandbox/binary/*
|
2018-02-11 14:05:05 +02:00
|
|
|
gh-ost-ci-env/bin/linux/dbdeployer unpack gh-ost-ci-env/mysql-tarballs/5.7.21.tar.gz --unpack-version=5.7.21 --sandbox-binary ${PWD}/sandbox/binary
|
|
|
|
|
|
|
|
mkdir -p sandboxes
|
2018-02-11 14:10:00 +02:00
|
|
|
rm -rf sandboxes/*
|
2018-02-11 14:05:05 +02:00
|
|
|
gh-ost-ci-env/bin/linux/dbdeployer replication 5.7.21 --nodes 2 --sandbox-binary ${PWD}/sandbox/binary --sandbox-home ${PWD}/sandboxes
|
2018-02-11 13:33:40 +02:00
|
|
|
|
2018-02-11 13:46:27 +02:00
|
|
|
sed '/sandboxes/d' -i gh-ost-ci-env/bin/gh-ost-test-mysql-master
|
2018-02-11 14:05:05 +02:00
|
|
|
echo 'sandboxes/rsandbox_5_7_21/m "$@"' >> gh-ost-ci-env/bin/gh-ost-test-mysql-master
|
2018-02-11 13:46:27 +02:00
|
|
|
|
|
|
|
sed '/sandboxes/d' -i gh-ost-ci-env/bin/gh-ost-test-mysql-replica
|
2018-02-11 14:05:05 +02:00
|
|
|
echo 'sandboxes/rsandbox_5_7_21/s1 "$@"' >> gh-ost-ci-env/bin/gh-ost-test-mysql-replica
|
2018-02-11 13:33:40 +02:00
|
|
|
|
2018-02-11 14:05:05 +02:00
|
|
|
export PATH="${PWD}/gh-ost-ci-env/bin/:${PATH}"
|
2018-02-11 14:21:38 +02:00
|
|
|
|
|
|
|
gh-ost-test-mysql-master -uroot -e "grant all on *.* to 'gh-ost'@'%' identified by 'gh-ost'"
|
|
|
|
|
2018-02-11 13:41:40 +02:00
|
|
|
echo "# Running localtests"
|
|
|
|
./localtests/test.sh
|
2018-02-11 14:14:43 +02:00
|
|
|
|
|
|
|
sandboxes/rsandbox_5_7_21/stop_all
|