testing multiple versions
This commit is contained in:
parent
00a4d1f960
commit
8e3694bccc
@ -6,28 +6,38 @@ whoami
|
||||
|
||||
[ -d "gh-ost-ci-env" ] || git clone https://github.com/github/gh-ost-ci-env.git
|
||||
|
||||
find sandboxes -name "stop_all" | bash
|
||||
test_mysql_version() {
|
||||
local mysql_version
|
||||
mysql_version="$1"
|
||||
|
||||
mkdir -p sandbox/binary
|
||||
rm -rf sandbox/binary/*
|
||||
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
|
||||
find sandboxes -name "stop_all" | bash
|
||||
|
||||
mkdir -p sandboxes
|
||||
rm -rf sandboxes/*
|
||||
gh-ost-ci-env/bin/linux/dbdeployer replication 5.7.21 --nodes 2 --sandbox-binary ${PWD}/sandbox/binary --sandbox-home ${PWD}/sandboxes --gtid --my-cnf-options log_slave_updates --my-cnf-options log_bin --my-cnf-options binlog_format=ROW
|
||||
mkdir -p sandbox/binary
|
||||
rm -rf sandbox/binary/*
|
||||
gh-ost-ci-env/bin/linux/dbdeployer unpack gh-ost-ci-env/mysql-tarballs/"$mysql_version".tar.gz --unpack-version="$mysql_version" --sandbox-binary ${PWD}/sandbox/binary
|
||||
|
||||
sed '/sandboxes/d' -i gh-ost-ci-env/bin/gh-ost-test-mysql-master
|
||||
echo 'sandboxes/rsandbox_5_7_21/m "$@"' >> gh-ost-ci-env/bin/gh-ost-test-mysql-master
|
||||
mkdir -p sandboxes
|
||||
rm -rf sandboxes/*
|
||||
gh-ost-ci-env/bin/linux/dbdeployer replication "$mysql_version" --nodes 2 --sandbox-binary ${PWD}/sandbox/binary --sandbox-home ${PWD}/sandboxes --gtid --my-cnf-options log_slave_updates --my-cnf-options log_bin --my-cnf-options binlog_format=ROW
|
||||
|
||||
sed '/sandboxes/d' -i gh-ost-ci-env/bin/gh-ost-test-mysql-replica
|
||||
echo 'sandboxes/rsandbox_5_7_21/s1 "$@"' >> gh-ost-ci-env/bin/gh-ost-test-mysql-replica
|
||||
sed '/sandboxes/d' -i gh-ost-ci-env/bin/gh-ost-test-mysql-master
|
||||
echo 'sandboxes/rsandbox_5_7_21/m "$@"' >> gh-ost-ci-env/bin/gh-ost-test-mysql-master
|
||||
|
||||
export PATH="${PWD}/gh-ost-ci-env/bin/:${PATH}"
|
||||
sed '/sandboxes/d' -i gh-ost-ci-env/bin/gh-ost-test-mysql-replica
|
||||
echo 'sandboxes/rsandbox_5_7_21/s1 "$@"' >> gh-ost-ci-env/bin/gh-ost-test-mysql-replica
|
||||
|
||||
gh-ost-test-mysql-master -uroot -e "grant all on *.* to 'gh-ost'@'%' identified by 'gh-ost'"
|
||||
export PATH="${PWD}/gh-ost-ci-env/bin/:${PATH}"
|
||||
|
||||
echo "# Running localtests"
|
||||
. script/build
|
||||
./localtests/test.sh -b bin/gh-ost
|
||||
gh-ost-test-mysql-master -uroot -e "grant all on *.* to 'gh-ost'@'%' identified by 'gh-ost'"
|
||||
|
||||
sandboxes/rsandbox_5_7_21/stop_all
|
||||
echo "# Testing $mysql_version"
|
||||
. script/build
|
||||
./localtests/test.sh -b bin/gh-ost
|
||||
|
||||
find sandboxes -name "stop_all" | bash
|
||||
}
|
||||
|
||||
# Test all versions:
|
||||
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.gz" | xargs basename | sed -e 's/.tar.gz//g' | sort -r | while read mysql_version ; do
|
||||
test_mysql_version "$mysql_version"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user