From f0ac65ffb5920cd0d59fd89117f07bba338aa7cd Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Mon, 7 Dec 2020 12:56:02 +0200 Subject: [PATCH] Fails system-test if they are not executed properly In case of VM creation problem or test code build problem run_test.sh and run_test_vm.sh exit with 1 to show the problem in the BuildBot --- system-test/mdbci/run_test.sh | 4 ++++ system-test/mdbci/run_test_vm.sh | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/system-test/mdbci/run_test.sh b/system-test/mdbci/run_test.sh index 744dba7d7..d750d82df 100755 --- a/system-test/mdbci/run_test.sh +++ b/system-test/mdbci/run_test.sh @@ -65,6 +65,10 @@ mkdir build && cd build cmake .. -DBUILD_SYSTEM_TESTS=Y -DBUILDNAME=${mdbci_config_name} -DCMAKE_BUILD_TYPE=Debug cd system-test make +if [ $? != 0 ] ; then + echo "Test code build FAILED! exiting" + exit 1 +fi echo ${test_set} | grep "NAME#" if [ $? == 0 ] ; then diff --git a/system-test/mdbci/run_test_vm.sh b/system-test/mdbci/run_test_vm.sh index b3c52fec9..657ca8b09 100755 --- a/system-test/mdbci/run_test_vm.sh +++ b/system-test/mdbci/run_test_vm.sh @@ -91,7 +91,10 @@ scp -i $key $sshopt test_env $me@$ip:~/ ssh -i $key $sshopt $me@$ip "sudo usermod --shell /bin/bash $me" ssh -i $key $sshopt $me@$ip "./MaxScale/BUILD/install_test_build_deps.sh" ssh -i $key $sshopt $me@$ip ". ./test_env; env; ./MaxScale/system-test/mdbci/run_test.sh" - +if [ $? != 0 ] ; then + echo "Tests execution FAILED! exiting" + exit 1 +fi . ${script_dir}/configure_log_dir.sh mkdir -p LOGS