Allow out-of-source test runs

The test can now be run outside of the test source directory. Since the
`test_dir` global variable contains the absolute path to the test source,
all copying of configurations and execution of scripts can be done with
minimal changes.
This commit is contained in:
Markus Mäkelä
2018-05-09 10:54:52 +03:00
parent 00581e7f35
commit ed2d0f4a5b
5 changed files with 38 additions and 36 deletions

View File

@ -65,7 +65,8 @@ ulimit -c unlimited
if [ $res == 0 ] ; then
. ${script_dir}/set_env.sh $name
cd ${script_dir}/..
cmake . -DBUILDNAME=$name -DCMAKE_BUILD_TYPE=Debug
mkdir build && cd build
cmake .. -DBUILDNAME=$name -DCMAKE_BUILD_TYPE=Debug
make
if [ ! -z "${named_test}" ] ; then

View File

@ -73,7 +73,9 @@ checkExitStatus $? "Error installing Maxscale" $snapshot_lock_file
cd ${script_dir}/..
cmake . -DBUILDNAME=$JOB_NAME-$BUILD_NUMBER-$target
rm -rf build
mkdir build && cd build
cmake .. -DBUILDNAME=$JOB_NAME-$BUILD_NUMBER-$target
make
./check_backend --restart-galera