Testing return values from run_tests

This commit is contained in:
Fabio Manganiello 2021-09-19 23:40:40 +02:00
parent 9310836bbd
commit 1eed63a612
1 changed files with 1 additions and 3 deletions

View File

@ -27,14 +27,13 @@ install_repo() {
run_tests() { run_tests() {
echo "Running tests" echo "Running tests"
pytest 2>&1 | tee "$TEST_LOG" pytest 2>&1 | tee "$TEST_LOG"
deactivate
grep -e '^FAILED ' "$TEST_LOG" grep -e '^FAILED ' "$TEST_LOG"
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
echo HERE FAIL
return 2 # FAILURE return 2 # FAILURE
fi fi
echo HERE PASS
return 0 # PASSED return 0 # PASSED
} }
@ -47,7 +46,6 @@ prepare_venv
install_repo install_repo
run_tests run_tests
ret=$? ret=$?
echo "RET: $ret"
cleanup cleanup
if [[ $ret == 0 ]]; then if [[ $ret == 0 ]]; then