MaxScale/maxscale-system-test/test_maxctrl.sh
Markus Mäkelä 2792f54089 Use explicit script path in test_maxctrl
The path to the script is now explicitly defined. This makes the call
unambiguous as the home directory depends on the current user.
2017-11-10 09:37:51 +02:00

33 lines
601 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
$maxscale_access_homedir/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