pytest script return status is not a reliable indicator for success/failure

This commit is contained in:
Fabio Manganiello 2021-03-06 16:20:53 +01:00
parent f57a3b2a0b
commit 8892e2e426

View file

@ -29,7 +29,12 @@ run_tests() {
echo "Running tests"
cd "$REPO_DIR"
pytest 2>&1 | tee "$TEST_LOG"
return $?
grep -e '^FAILED ' "$TEST_LOG"
if [[ $? == 0 ]]; then
return 2 # FAILURE
fi
return 0 # PASSED
}
########