Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jul 9, 2024
1 parent 9e481a6 commit d9a7178
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/unittest/linux_examples/scripts/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,19 @@
#
#

set -e
#set -e
set -v

# Initialize an error flag
error_occurred=0
# Function to handle errors
error_handler() {
echo "Error on line $1"
error_occurred=1
}
# Trap ERR to call the error_handler function with the failing line number
trap 'error_handler $LINENO' ERR

export PYTORCH_TEST_WITH_SLOW='1'
python -m torch.utils.collect_env
# Avoid error: "fatal: unsafe repository"
Expand Down Expand Up @@ -299,3 +309,11 @@ python .github/unittest/helpers/coverage_run_parallel.py sota-implementations/ba

coverage combine
coverage xml -i

# Check if any errors occurred during the script execution
if [ "$error_occurred" -ne 0 ]; then
echo "Errors occurred during script execution"
exit 1
else
echo "Script executed successfully"
fi

0 comments on commit d9a7178

Please sign in to comment.