Skip to content

Remove set -e to continue tests even on failures #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/run_pytorch.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash
set -e
. ~/miniconda3/etc/profile.d/conda.sh
conda activate base

ALL_FILE=$(find *.md ! -name README.md)
TEMP_PY="temp.py"
CUDAS="nvidia"

declare -i error_code=0

for f in $ALL_FILE
do
echo "Running pytorch example in $f"
Expand All @@ -24,9 +25,12 @@ do
else
sed -n '/^```python/,/^```/ p' < $f | sed '/^```/ d' > $TEMP_PY
python $TEMP_PY
error_code+=$?

if [ -f "$TEMP_PY" ]; then
rm $TEMP_PY
fi
fi
done

exit $error_code