Adding localtests via gh-ost-ci-env

This commit is contained in:
Shlomi Noach 2018-02-11 13:33:40 +02:00
parent 4390c854ca
commit e346ecf11f
3 changed files with 23 additions and 0 deletions

View File

@ -8,6 +8,14 @@ os:
env:
- MYSQL_USER=root
- CURRENT_CI_ENV=travis
addons:
apt:
packages:
- git
- numactl
- libaio1
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'

View File

@ -15,3 +15,5 @@ cd .gopath/src/github.com/github/gh-ost
echo "Running unit tests"
go test ./go/...
. script/localtests

13
script/localtests Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
set -e
git clone https://github.com/github/gh-ost-ci-env.git
mkdir -p ~/opt/mysql
mkdir -p ~/sandboxes
gh-ost-ci-env/bin/linux/dbdeployer unpack gh-ost-ci-env/mysql-tarballs/5.7.21.tar.gz --unpack-version=5.7.21
echo '~/sandboxes/rsandbox_5_7_21/m "$@"' >> gh-ost-ci-env/bin/gh-ost-test-mysql-master
echo '~/sandboxes/rsandbox_5_7_21/s1 "$@"' >> gh-ost-ci-env/bin/gh-ost-test-mysql-replica
export PATH="${HOME}/gh-ost-ci-env/bin/:${PATH}"