prebuilt binary for localtests
This commit is contained in:
parent
540001b283
commit
00a4d1f960
@ -9,17 +9,30 @@
|
|||||||
|
|
||||||
tests_path=$(dirname $0)
|
tests_path=$(dirname $0)
|
||||||
test_logfile=/tmp/gh-ost-test.log
|
test_logfile=/tmp/gh-ost-test.log
|
||||||
ghost_binary=/tmp/gh-ost-test
|
default_ghost_binary=/tmp/gh-ost-test
|
||||||
|
ghost_binary=""
|
||||||
exec_command_file=/tmp/gh-ost-test.bash
|
exec_command_file=/tmp/gh-ost-test.bash
|
||||||
orig_content_output_file=/tmp/gh-ost-test.orig.content.csv
|
orig_content_output_file=/tmp/gh-ost-test.orig.content.csv
|
||||||
ghost_content_output_file=/tmp/gh-ost-test.ghost.content.csv
|
ghost_content_output_file=/tmp/gh-ost-test.ghost.content.csv
|
||||||
test_pattern="${1:-.}"
|
|
||||||
|
|
||||||
master_host=
|
master_host=
|
||||||
master_port=
|
master_port=
|
||||||
replica_host=
|
replica_host=
|
||||||
replica_port=
|
replica_port=
|
||||||
|
|
||||||
|
OPTIND=1
|
||||||
|
while getopts "b:" OPTION
|
||||||
|
do
|
||||||
|
case $OPTION in
|
||||||
|
b)
|
||||||
|
ghost_binary="$OPTARG"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
|
test_pattern="${1:-.}"
|
||||||
|
|
||||||
verify_master_and_replica() {
|
verify_master_and_replica() {
|
||||||
if [ "$(gh-ost-test-mysql-master -e "select 1" -ss)" != "1" ] ; then
|
if [ "$(gh-ost-test-mysql-master -e "select 1" -ss)" != "1" ] ; then
|
||||||
echo "Cannot verify gh-ost-test-mysql-master"
|
echo "Cannot verify gh-ost-test-mysql-master"
|
||||||
@ -176,7 +189,12 @@ test_single() {
|
|||||||
|
|
||||||
build_binary() {
|
build_binary() {
|
||||||
echo "Building"
|
echo "Building"
|
||||||
rm -f $ghost_binary
|
rm -f $default_ghost_binary
|
||||||
|
[ "$ghost_binary" == "" ] && ghost_binary="$default_ghost_binary"
|
||||||
|
if [ -f "$ghost_binary" ] ; then
|
||||||
|
echo "Using binary: $ghost_binary"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
go build -o $ghost_binary go/cmd/gh-ost/main.go
|
go build -o $ghost_binary go/cmd/gh-ost/main.go
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "Build failure"
|
echo "Build failure"
|
||||||
|
@ -27,6 +27,7 @@ export PATH="${PWD}/gh-ost-ci-env/bin/:${PATH}"
|
|||||||
gh-ost-test-mysql-master -uroot -e "grant all on *.* to 'gh-ost'@'%' identified by 'gh-ost'"
|
gh-ost-test-mysql-master -uroot -e "grant all on *.* to 'gh-ost'@'%' identified by 'gh-ost'"
|
||||||
|
|
||||||
echo "# Running localtests"
|
echo "# Running localtests"
|
||||||
./localtests/test.sh
|
. script/build
|
||||||
|
./localtests/test.sh -b bin/gh-ost
|
||||||
|
|
||||||
sandboxes/rsandbox_5_7_21/stop_all
|
sandboxes/rsandbox_5_7_21/stop_all
|
||||||
|
Loading…
Reference in New Issue
Block a user