From e346ecf11f101922e441f4ecd4106fd4d9fcaa11 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Sun, 11 Feb 2018 13:33:40 +0200 Subject: [PATCH] Adding localtests via gh-ost-ci-env --- .travis.yml | 8 ++++++++ script/cibuild | 2 ++ script/localtests | 13 +++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 script/localtests diff --git a/.travis.yml b/.travis.yml index 3006208..203ff86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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;' diff --git a/script/cibuild b/script/cibuild index 7e757b5..fb9955d 100755 --- a/script/cibuild +++ b/script/cibuild @@ -15,3 +15,5 @@ cd .gopath/src/github.com/github/gh-ost echo "Running unit tests" go test ./go/... + +. script/localtests diff --git a/script/localtests b/script/localtests new file mode 100644 index 0000000..a896581 --- /dev/null +++ b/script/localtests @@ -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}"