diff --git a/bin/run_ci_tests.sh b/bin/run_ci_tests.sh index bdff56d..01d291b 100755 --- a/bin/run_ci_tests.sh +++ b/bin/run_ci_tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -BASE_DIR=$(pwd) +BASE_DIR="$(pwd)" VENV_DIR="$BASE_DIR/venv" REPO_DIR="$BASE_DIR/repo" TEST_LOG="$BASE_DIR/test.log" @@ -33,7 +33,8 @@ run_tests() { check_test_results() { grep -e '^FAILED' "$TEST_LOG" >/dev/null - if [[ $? == 0 ]]; then + ret=$? + if [[ $ret == 0 ]]; then echo "------------------" echo "Some tests failed!" echo "------------------" @@ -41,6 +42,8 @@ check_test_results() { else echo "All tests passed" fi + + return $ret } ######## @@ -51,6 +54,10 @@ cleanup prepare_venv install_repo run_tests -check_test_results -cleanup + +check_test_results +tests_passed=$? + +cleanup +exit $tests_passed