Don't assume source and binary directories are the same

Some of the scripts assumed that other scripts would be located in the
same directory where the current script was executed.

Also fixed the SSL connection creation which depended on an obsolete
environment variable causing all out-of-source SSL tests to fail.
This commit is contained in:
Markus Mäkelä
2018-05-11 00:10:24 +03:00
parent 16b777ad17
commit b776ed7821
17 changed files with 88 additions and 74 deletions

View File

@ -5,6 +5,7 @@
## run a set of queries in the loop (see setmix.sql) using Perl client
rp=`realpath $0`
export src_dir=`dirname $rp`
export test_dir=`pwd`
export test_name=`basename $rp`
@ -15,7 +16,7 @@ then
echo "configuring maxscale failed"
exit 1
fi
export ssl_options="--ssl-cert=$test_dir/ssl-cert/client-cert.pem --ssl-key=$test_dir/ssl-cert/client-key.pem"
export ssl_options="--ssl-cert=$src_dir/ssl-cert/client-cert.pem --ssl-key=$src_dir/ssl-cert/client-key.pem"
echo "drop table if exists t1; create table t1(id integer primary key); " | mysql -u$node_user -p$node_password -h$maxscale_IP -P 4006 $ssl_options test
@ -27,8 +28,8 @@ fi
res=0
$test_dir/session_hang/run_setmix.sh &
perl $test_dir/session_hang/simpletest.pl
$src_dir/session_hang/run_setmix.sh &
perl $src_dir/session_hang/simpletest.pl
if [ $? -ne 0 ]
then
res=1
@ -52,6 +53,6 @@ else
echo "Test PASSED"
fi
$test_dir/copy_logs.sh run_session_hang
$src_dir/copy_logs.sh run_session_hang
exit $res