From 16b777ad17f141d7bbbb58f3f3ff2340811f625e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 10 May 2018 23:53:53 +0300 Subject: [PATCH] Fix shell-script tests The tests expected the source directory to contain the executables. --- maxscale-system-test/bug561.sh | 2 +- maxscale-system-test/bug562.sh | 2 +- maxscale-system-test/bug564.sh | 2 +- maxscale-system-test/bug567.sh | 2 +- maxscale-system-test/long_insert.sh | 2 +- maxscale-system-test/mxs791.sh | 2 +- maxscale-system-test/mxs791_base.sh | 3 ++- maxscale-system-test/mxs791_galera.sh | 2 +- maxscale-system-test/run_ctrl_c.sh | 2 +- maxscale-system-test/run_session_hang.sh | 2 +- maxscale-system-test/start_without_root.sh | 2 +- 11 files changed, 12 insertions(+), 11 deletions(-) diff --git a/maxscale-system-test/bug561.sh b/maxscale-system-test/bug561.sh index 9ceb8c16a..46341e94e 100755 --- a/maxscale-system-test/bug561.sh +++ b/maxscale-system-test/bug561.sh @@ -8,7 +8,7 @@ rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name=`basename $rp` $test_dir/non_native_setup $test_name diff --git a/maxscale-system-test/bug562.sh b/maxscale-system-test/bug562.sh index a19907a6f..39f74762e 100755 --- a/maxscale-system-test/bug562.sh +++ b/maxscale-system-test/bug562.sh @@ -6,7 +6,7 @@ ## - compare error messages rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name=`basename $rp` $test_dir/non_native_setup $test_name diff --git a/maxscale-system-test/bug564.sh b/maxscale-system-test/bug564.sh index 1113d74dc..a45c896cf 100755 --- a/maxscale-system-test/bug564.sh +++ b/maxscale-system-test/bug564.sh @@ -6,7 +6,7 @@ ## - check output of SHOW VARIABLES LIKE 'char%' rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name=`basename $rp` $test_dir/non_native_setup $test_name diff --git a/maxscale-system-test/bug567.sh b/maxscale-system-test/bug567.sh index 06de54fd7..7b5d90932 100755 --- a/maxscale-system-test/bug567.sh +++ b/maxscale-system-test/bug567.sh @@ -6,7 +6,7 @@ ## check if Maxscale is alive rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name=`basename $rp` $test_dir/non_native_setup $test_name diff --git a/maxscale-system-test/long_insert.sh b/maxscale-system-test/long_insert.sh index 17e146d78..c668719a4 100755 --- a/maxscale-system-test/long_insert.sh +++ b/maxscale-system-test/long_insert.sh @@ -1,7 +1,7 @@ #!/bin/bash rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name=`basename $rp` $test_dir/non_native_setup $test_name export ssl_options="--ssl-cert=$test_dir/ssl-cert/client-cert.pem --ssl-key=$test_dir/ssl-cert/client-key.pem" diff --git a/maxscale-system-test/mxs791.sh b/maxscale-system-test/mxs791.sh index 0729ae40f..ada409f45 100755 --- a/maxscale-system-test/mxs791.sh +++ b/maxscale-system-test/mxs791.sh @@ -5,7 +5,7 @@ ## - connects to Maxscale, checks that defined in cmd line DB is selected rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name="mxs791.sh" echo test name is $test_name diff --git a/maxscale-system-test/mxs791_base.sh b/maxscale-system-test/mxs791_base.sh index f22643e33..f90f40aa7 100755 --- a/maxscale-system-test/mxs791_base.sh +++ b/maxscale-system-test/mxs791_base.sh @@ -1,5 +1,6 @@ #!/bin/bash -$test_dir/non_native_setup $test_name + +$PWD/non_native_setup $test_name if [ $? -ne 0 ] ; then echo "configuring maxscale failed" diff --git a/maxscale-system-test/mxs791_galera.sh b/maxscale-system-test/mxs791_galera.sh index 4d9bdb2c0..421549f84 100755 --- a/maxscale-system-test/mxs791_galera.sh +++ b/maxscale-system-test/mxs791_galera.sh @@ -5,7 +5,7 @@ ## - connects to Maxscale, checks that defined in cmd line DB is selected rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name="mxs791_galera.sh" echo test name is $test_name diff --git a/maxscale-system-test/run_ctrl_c.sh b/maxscale-system-test/run_ctrl_c.sh index d636eed1e..f1504c9ec 100755 --- a/maxscale-system-test/run_ctrl_c.sh +++ b/maxscale-system-test/run_ctrl_c.sh @@ -5,7 +5,7 @@ ## check that Maxscale is reacting correctly on ctrc+c signal and termination does not take ages rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name=`basename $rp` if [ $maxscale_IP == "127.0.0.1" ] ; then diff --git a/maxscale-system-test/run_session_hang.sh b/maxscale-system-test/run_session_hang.sh index f0a12d231..236455134 100755 --- a/maxscale-system-test/run_session_hang.sh +++ b/maxscale-system-test/run_session_hang.sh @@ -5,7 +5,7 @@ ## run a set of queries in the loop (see setmix.sql) using Perl client rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name=`basename $rp` $test_dir/non_native_setup $test_name diff --git a/maxscale-system-test/start_without_root.sh b/maxscale-system-test/start_without_root.sh index f9c3a1a0a..f8e3717d8 100755 --- a/maxscale-system-test/start_without_root.sh +++ b/maxscale-system-test/start_without_root.sh @@ -1,7 +1,7 @@ #!/bin/bash rp=`realpath $0` -export test_dir=`dirname $rp` +export test_dir=`pwd` export test_name=`basename $rp` $test_dir/non_native_setup $test_name