Files
MaxScale/maxscale-system-test/test_maxctrl.sh
Markus Mäkelä 938484a73e Allow remote server to be used for maxctrl test suite
The test suite now works with remote servers and is now fully integrated
to the regression test suite.
2017-10-12 13:16:12 +03:00

33 lines
578 B
Bash
Executable File

#!/bin/bash
# Check branch name
ref=$(maxscale --version-full 2>&1|grep -o ' - .*'|sed 's/ - //')
if [ -z "$ref" ]
then
echo "Error: No commit ID in --version-full output"
exit 1
fi
if [ ! -d MaxScale ]
then
git clone https://www.github.com/mariadb-corporation/MaxScale.git
cd MaxScale
git checkout $ref
cd ..
fi
cd MaxScale/maxctrl
# Create the scripts that start and stop MaxScale
~/maxctrl_scripts.sh
chmod +x *.sh
npm i
# Export the value for --basedir where maxscale binaries are located
export MAXSCALE_DIR=/usr
./stop_maxscale.sh
npm test